Peter Zijlstra 9e35ad388b perf_counter: Rework the perf counter disable/enable
The current disable/enable mechanism is:

	token = hw_perf_save_disable();
	...
	/* do bits */
	...
	hw_perf_restore(token);

This works well, provided that the use nests properly. Except we don't.

x86 NMI/INT throttling has non-nested use of this, breaking things. Therefore
provide a reference counter disable/enable interface, where the first disable
disables the hardware, and the last enable enables the hardware again.

[ Impact: refactor, simplify the PMU disable/enable logic ]

Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
LKML-Reference: <new-submission>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
2009-05-15 09:47:02 +02:00
..
2009-04-28 20:24:20 +02:00
2009-04-21 13:41:51 -07:00
2009-04-13 15:04:29 -07:00
2009-04-05 00:32:25 +02:00
2009-04-24 07:52:08 -07:00
2009-04-21 13:41:50 -07:00
2009-04-14 19:46:19 -07:00
2009-04-24 07:52:08 -07:00
2009-04-21 13:41:49 -07:00
2009-04-27 12:00:27 -07:00
2009-04-05 00:32:22 +02:00
2009-04-08 14:25:51 -07:00