diff options
author | Paul Mackerras <paulus@samba.org> | 2009-03-19 15:26:20 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-04-06 03:30:18 -0400 |
commit | db4fb5acf20295063d1d5105e67724eb51440207 (patch) | |
tree | d5f762e4110e7230bac52ce9677277c7749f6922 /arch/powerpc/kernel/perf_counter.c | |
parent | 0322cd6ec504b0bf08ca7b2c3d7f43bda37d79c9 (diff) |
perf_counter: powerpc: clean up perc_counter_interrupt
Impact: cleanup
This updates the powerpc perf_counter_interrupt following on from the
"perf_counter: unify irq output code" patch. Since we now use the
generic perf_counter_output code, which sets the perf_counter_pending
flag directly, we no longer need the need_wakeup variable.
This removes need_wakeup and makes perf_counter_interrupt use
get_perf_counter_pending() instead.
Signed-off-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Orig-LKML-Reference: <20090319194234.024464535@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/powerpc/kernel/perf_counter.c')
-rw-r--r-- | arch/powerpc/kernel/perf_counter.c | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/arch/powerpc/kernel/perf_counter.c b/arch/powerpc/kernel/perf_counter.c index 88b72eb4af12..830ca9c4494c 100644 --- a/arch/powerpc/kernel/perf_counter.c +++ b/arch/powerpc/kernel/perf_counter.c | |||
@@ -723,8 +723,6 @@ static void perf_counter_interrupt(struct pt_regs *regs) | |||
723 | /* counter has overflowed */ | 723 | /* counter has overflowed */ |
724 | found = 1; | 724 | found = 1; |
725 | record_and_restart(counter, val, regs); | 725 | record_and_restart(counter, val, regs); |
726 | if (counter->wakeup_pending) | ||
727 | need_wakeup = 1; | ||
728 | } | 726 | } |
729 | } | 727 | } |
730 | 728 | ||
@@ -754,17 +752,14 @@ static void perf_counter_interrupt(struct pt_regs *regs) | |||
754 | /* | 752 | /* |
755 | * If we need a wakeup, check whether interrupts were soft-enabled | 753 | * If we need a wakeup, check whether interrupts were soft-enabled |
756 | * when we took the interrupt. If they were, we can wake stuff up | 754 | * when we took the interrupt. If they were, we can wake stuff up |
757 | * immediately; otherwise we'll have to set a flag and do the | 755 | * immediately; otherwise we'll have do the wakeup when interrupts |
758 | * wakeup when interrupts get soft-enabled. | 756 | * get soft-enabled. |
759 | */ | 757 | */ |
760 | if (need_wakeup) { | 758 | if (get_perf_counter_pending() && regs->softe) { |
761 | if (regs->softe) { | 759 | irq_enter(); |
762 | irq_enter(); | 760 | clear_perf_counter_pending(); |
763 | perf_counter_do_pending(); | 761 | perf_counter_do_pending(); |
764 | irq_exit(); | 762 | irq_exit(); |
765 | } else { | ||
766 | set_perf_counter_pending(); | ||
767 | } | ||
768 | } | 763 | } |
769 | } | 764 | } |
770 | 765 | ||