aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/ps3/interrupt.c
diff options
context:
space:
mode:
authorGeoff Levand <geoffrey.levand@am.sony.com>2007-01-26 22:07:59 -0500
committerPaul Mackerras <paulus@samba.org>2007-02-06 22:03:18 -0500
commit9633ac8d172f74b8ee51e0fe85c06eb726039aa8 (patch)
treed6679b8138989102f6547ff1535f4e96e34c1985 /arch/powerpc/platforms/ps3/interrupt.c
parenta8229a9e5211a52839268b82ae14cdf528d48f58 (diff)
[POWERPC] ps3: rename interrupt symbols
Rename some PS3 interrupt symbols to avoid name clashes and aid debugging. No change to code. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Acked-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/ps3/interrupt.c')
-rw-r--r--arch/powerpc/platforms/ps3/interrupt.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/arch/powerpc/platforms/ps3/interrupt.c b/arch/powerpc/platforms/ps3/interrupt.c
index 6f5de438b98..9c8f3b568a2 100644
--- a/arch/powerpc/platforms/ps3/interrupt.c
+++ b/arch/powerpc/platforms/ps3/interrupt.c
@@ -288,7 +288,7 @@ int ps3_free_spe_irq(unsigned int virq)
288#define PS3_PLUG_MAX 63 288#define PS3_PLUG_MAX 63
289 289
290/** 290/**
291 * struct bmp - a per cpu irq status and mask bitmap structure 291 * struct ps3_bmp - a per cpu irq status and mask bitmap structure
292 * @status: 256 bit status bitmap indexed by plug 292 * @status: 256 bit status bitmap indexed by plug
293 * @unused_1: 293 * @unused_1:
294 * @mask: 256 bit mask bitmap indexed by plug 294 * @mask: 256 bit mask bitmap indexed by plug
@@ -311,7 +311,7 @@ int ps3_free_spe_irq(unsigned int virq)
311 * can aquire. 311 * can aquire.
312 */ 312 */
313 313
314struct bmp { 314struct ps3_bmp {
315 struct { 315 struct {
316 unsigned long status; 316 unsigned long status;
317 unsigned long unused_1[3]; 317 unsigned long unused_1[3];
@@ -323,16 +323,16 @@ struct bmp {
323}; 323};
324 324
325/** 325/**
326 * struct private - a per cpu data structure 326 * struct ps3_private - a per cpu data structure
327 * @node: HV node id 327 * @node: HV node id
328 * @cpu: HV thread id 328 * @cpu: HV thread id
329 * @bmp: an HV bmp structure 329 * @bmp: an HV ps3_bmp structure
330 */ 330 */
331 331
332struct private { 332struct ps3_private {
333 unsigned long node; 333 unsigned long node;
334 unsigned int cpu; 334 unsigned int cpu;
335 struct bmp bmp; 335 struct ps3_bmp bmp;
336}; 336};
337 337
338#if defined(DEBUG) 338#if defined(DEBUG)
@@ -353,7 +353,7 @@ static void __attribute__ ((unused)) _dump_256_bmp(const char *header,
353} 353}
354 354
355#define dump_bmp(_x) _dump_bmp(_x, __func__, __LINE__) 355#define dump_bmp(_x) _dump_bmp(_x, __func__, __LINE__)
356static void _dump_bmp(struct private* pd, const char* func, int line) 356static void _dump_bmp(struct ps3_private* pd, const char* func, int line)
357{ 357{
358 unsigned long flags; 358 unsigned long flags;
359 359
@@ -364,7 +364,7 @@ static void _dump_bmp(struct private* pd, const char* func, int line)
364} 364}
365 365
366#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__) 366#define dump_mask(_x) _dump_mask(_x, __func__, __LINE__)
367static void __attribute__ ((unused)) _dump_mask(struct private* pd, 367static void __attribute__ ((unused)) _dump_mask(struct ps3_private* pd,
368 const char* func, int line) 368 const char* func, int line)
369{ 369{
370 unsigned long flags; 370 unsigned long flags;
@@ -374,13 +374,13 @@ static void __attribute__ ((unused)) _dump_mask(struct private* pd,
374 spin_unlock_irqrestore(&pd->bmp.lock, flags); 374 spin_unlock_irqrestore(&pd->bmp.lock, flags);
375} 375}
376#else 376#else
377static void dump_bmp(struct private* pd) {}; 377static void dump_bmp(struct ps3_private* pd) {};
378#endif /* defined(DEBUG) */ 378#endif /* defined(DEBUG) */
379 379
380static void chip_mask(unsigned int virq) 380static void ps3_chip_mask(unsigned int virq)
381{ 381{
382 unsigned long flags; 382 unsigned long flags;
383 struct private *pd = get_irq_chip_data(virq); 383 struct ps3_private *pd = get_irq_chip_data(virq);
384 384
385 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq); 385 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
386 386
@@ -394,10 +394,10 @@ static void chip_mask(unsigned int virq)
394 lv1_did_update_interrupt_mask(pd->node, pd->cpu); 394 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
395} 395}
396 396
397static void chip_unmask(unsigned int virq) 397static void ps3_chip_unmask(unsigned int virq)
398{ 398{
399 unsigned long flags; 399 unsigned long flags;
400 struct private *pd = get_irq_chip_data(virq); 400 struct ps3_private *pd = get_irq_chip_data(virq);
401 401
402 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq); 402 pr_debug("%s:%d: cpu %u, virq %d\n", __func__, __LINE__, pd->cpu, virq);
403 403
@@ -411,19 +411,19 @@ static void chip_unmask(unsigned int virq)
411 lv1_did_update_interrupt_mask(pd->node, pd->cpu); 411 lv1_did_update_interrupt_mask(pd->node, pd->cpu);
412} 412}
413 413
414static void chip_eoi(unsigned int virq) 414static void ps3_chip_eoi(unsigned int virq)
415{ 415{
416 lv1_end_of_interrupt(virq); 416 lv1_end_of_interrupt(virq);
417} 417}
418 418
419static struct irq_chip irq_chip = { 419static struct irq_chip irq_chip = {
420 .typename = "ps3", 420 .typename = "ps3",
421 .mask = chip_mask, 421 .mask = ps3_chip_mask,
422 .unmask = chip_unmask, 422 .unmask = ps3_chip_unmask,
423 .eoi = chip_eoi, 423 .eoi = ps3_chip_eoi,
424}; 424};
425 425
426static void host_unmap(struct irq_host *h, unsigned int virq) 426static void ps3_host_unmap(struct irq_host *h, unsigned int virq)
427{ 427{
428 int result; 428 int result;
429 429
@@ -435,9 +435,9 @@ static void host_unmap(struct irq_host *h, unsigned int virq)
435 BUG_ON(result); 435 BUG_ON(result);
436} 436}
437 437
438static DEFINE_PER_CPU(struct private, private); 438static DEFINE_PER_CPU(struct ps3_private, ps3_private);
439 439
440static int host_map(struct irq_host *h, unsigned int virq, 440static int ps3_host_map(struct irq_host *h, unsigned int virq,
441 irq_hw_number_t hwirq) 441 irq_hw_number_t hwirq)
442{ 442{
443 int result; 443 int result;
@@ -460,7 +460,7 @@ static int host_map(struct irq_host *h, unsigned int virq,
460 return -EPERM; 460 return -EPERM;
461 } 461 }
462 462
463 result = set_irq_chip_data(virq, &per_cpu(private, cpu)); 463 result = set_irq_chip_data(virq, &per_cpu(ps3_private, cpu));
464 BUG_ON(result); 464 BUG_ON(result);
465 465
466 set_irq_chip_and_handler(virq, &irq_chip, handle_fasteoi_irq); 466 set_irq_chip_and_handler(virq, &irq_chip, handle_fasteoi_irq);
@@ -469,14 +469,14 @@ static int host_map(struct irq_host *h, unsigned int virq,
469 return result; 469 return result;
470} 470}
471 471
472static struct irq_host_ops host_ops = { 472static struct irq_host_ops ps3_host_ops = {
473 .map = host_map, 473 .map = ps3_host_map,
474 .unmap = host_unmap, 474 .unmap = ps3_host_unmap,
475}; 475};
476 476
477void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq) 477void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
478{ 478{
479 struct private *pd = &per_cpu(private, cpu); 479 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
480 480
481 pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq; 481 pd->bmp.ipi_debug_brk_mask = 0x8000000000000000UL >> virq;
482 482
@@ -484,7 +484,7 @@ void __init ps3_register_ipi_debug_brk(unsigned int cpu, unsigned int virq)
484 cpu, virq, pd->bmp.ipi_debug_brk_mask); 484 cpu, virq, pd->bmp.ipi_debug_brk_mask);
485} 485}
486 486
487static int bmp_get_and_clear_status_bit(struct bmp *m) 487static int bmp_get_and_clear_status_bit(struct ps3_bmp *m)
488{ 488{
489 unsigned long flags; 489 unsigned long flags;
490 unsigned int bit; 490 unsigned int bit;
@@ -519,22 +519,22 @@ unsigned int ps3_get_irq(void)
519{ 519{
520 int plug; 520 int plug;
521 521
522 struct private *pd = &__get_cpu_var(private); 522 struct ps3_private *pd = &__get_cpu_var(ps3_private);
523 523
524 plug = bmp_get_and_clear_status_bit(&pd->bmp); 524 plug = bmp_get_and_clear_status_bit(&pd->bmp);
525 525
526 if (plug < 1) { 526 if (plug < 1) {
527 pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__, 527 pr_debug("%s:%d: no plug found: cpu %u\n", __func__, __LINE__,
528 pd->cpu); 528 pd->cpu);
529 dump_bmp(&per_cpu(private, 0)); 529 dump_bmp(&per_cpu(ps3_private, 0));
530 dump_bmp(&per_cpu(private, 1)); 530 dump_bmp(&per_cpu(ps3_private, 1));
531 return NO_IRQ; 531 return NO_IRQ;
532 } 532 }
533 533
534#if defined(DEBUG) 534#if defined(DEBUG)
535 if (plug < NUM_ISA_INTERRUPTS || plug > PS3_PLUG_MAX) { 535 if (plug < NUM_ISA_INTERRUPTS || plug > PS3_PLUG_MAX) {
536 dump_bmp(&per_cpu(private, 0)); 536 dump_bmp(&per_cpu(ps3_private, 0));
537 dump_bmp(&per_cpu(private, 1)); 537 dump_bmp(&per_cpu(ps3_private, 1));
538 BUG(); 538 BUG();
539 } 539 }
540#endif 540#endif
@@ -550,13 +550,13 @@ void __init ps3_init_IRQ(void)
550 550
551 lv1_get_logical_ppe_id(&node); 551 lv1_get_logical_ppe_id(&node);
552 552
553 host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &host_ops, 553 host = irq_alloc_host(IRQ_HOST_MAP_NOMAP, 0, &ps3_host_ops,
554 PS3_INVALID_OUTLET); 554 PS3_INVALID_OUTLET);
555 irq_set_default_host(host); 555 irq_set_default_host(host);
556 irq_set_virq_count(PS3_PLUG_MAX + 1); 556 irq_set_virq_count(PS3_PLUG_MAX + 1);
557 557
558 for_each_possible_cpu(cpu) { 558 for_each_possible_cpu(cpu) {
559 struct private *pd = &per_cpu(private, cpu); 559 struct ps3_private *pd = &per_cpu(ps3_private, cpu);
560 560
561 pd->node = node; 561 pd->node = node;
562 pd->cpu = cpu; 562 pd->cpu = cpu;