Commit db4fb5ac authored by Paul Mackerras's avatar Paul Mackerras Committed by Ingo Molnar

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: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Steven Rostedt <rostedt@goodmis.org>
Orig-LKML-Reference: <20090319194234.024464535@chello.nl>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 0322cd6e
...@@ -723,8 +723,6 @@ static void perf_counter_interrupt(struct pt_regs *regs) ...@@ -723,8 +723,6 @@ static void perf_counter_interrupt(struct pt_regs *regs)
/* counter has overflowed */ /* counter has overflowed */
found = 1; found = 1;
record_and_restart(counter, val, regs); record_and_restart(counter, val, regs);
if (counter->wakeup_pending)
need_wakeup = 1;
} }
} }
...@@ -754,17 +752,14 @@ static void perf_counter_interrupt(struct pt_regs *regs) ...@@ -754,17 +752,14 @@ static void perf_counter_interrupt(struct pt_regs *regs)
/* /*
* If we need a wakeup, check whether interrupts were soft-enabled * If we need a wakeup, check whether interrupts were soft-enabled
* when we took the interrupt. If they were, we can wake stuff up * when we took the interrupt. If they were, we can wake stuff up
* immediately; otherwise we'll have to set a flag and do the * immediately; otherwise we'll have do the wakeup when interrupts
* wakeup when interrupts get soft-enabled. * get soft-enabled.
*/ */
if (need_wakeup) { if (get_perf_counter_pending() && regs->softe) {
if (regs->softe) { irq_enter();
irq_enter(); clear_perf_counter_pending();
perf_counter_do_pending(); perf_counter_do_pending();
irq_exit(); irq_exit();
} else {
set_perf_counter_pending();
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment