diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2005-12-09 07:29:38 -0500 |
---|---|---|
committer | <ralf@denk.linux-mips.net> | 2006-01-10 08:39:07 -0500 |
commit | ba339c03e2e8ede8ccd37ed6c4e564e3b1545495 (patch) | |
tree | 1a7bbfd15a9c46d5300d2d5a1890d748b81dbce2 /arch/mips/kernel | |
parent | 0401572a9b9b2f368176b6e53f53004fd048a566 (diff) |
MIPS: Oprofile: Fixup the loose ends in the plumbing.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/kernel')
-rw-r--r-- | arch/mips/kernel/time.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/arch/mips/kernel/time.c b/arch/mips/kernel/time.c index 07e125c027b2..7050b4ffffcd 100644 --- a/arch/mips/kernel/time.c +++ b/arch/mips/kernel/time.c | |||
@@ -507,14 +507,38 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs) | |||
507 | return IRQ_HANDLED; | 507 | return IRQ_HANDLED; |
508 | } | 508 | } |
509 | 509 | ||
510 | int null_perf_irq(struct pt_regs *regs) | ||
511 | { | ||
512 | return 0; | ||
513 | } | ||
514 | |||
515 | int (*perf_irq)(struct pt_regs *regs) = null_perf_irq; | ||
516 | |||
517 | EXPORT_SYMBOL(null_perf_irq); | ||
518 | EXPORT_SYMBOL(perf_irq); | ||
519 | |||
510 | asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs) | 520 | asmlinkage void ll_timer_interrupt(int irq, struct pt_regs *regs) |
511 | { | 521 | { |
522 | int r2 = cpu_has_mips_r2; | ||
523 | |||
512 | irq_enter(); | 524 | irq_enter(); |
513 | kstat_this_cpu.irqs[irq]++; | 525 | kstat_this_cpu.irqs[irq]++; |
514 | 526 | ||
527 | /* | ||
528 | * Suckage alert: | ||
529 | * Before R2 of the architecture there was no way to see if a | ||
530 | * performance counter interrupt was pending, so we have to run the | ||
531 | * performance counter interrupt handler anyway. | ||
532 | */ | ||
533 | if (!r2 || (read_c0_cause() & (1 << 26))) | ||
534 | if (perf_irq(regs)) | ||
535 | goto out; | ||
536 | |||
515 | /* we keep interrupt disabled all the time */ | 537 | /* we keep interrupt disabled all the time */ |
516 | timer_interrupt(irq, NULL, regs); | 538 | if (!r2 || (read_c0_cause() & (1 << 30))) |
539 | timer_interrupt(irq, NULL, regs); | ||
517 | 540 | ||
541 | out: | ||
518 | irq_exit(); | 542 | irq_exit(); |
519 | } | 543 | } |
520 | 544 | ||