linux/arch/x86/oprofile
Robert Richter 6ae56b55bc oprofile/x86: protect cpu hotplug sections
This patch reworks oprofile cpu hotplug code as follows:

Introduce ctr_running variable to check, if counters are running or
not. The state must be known for taking a cpu on or offline and when
switching counters during counter multiplexing.

Protect on_each_cpu() sections with get_online_cpus()/put_online_cpu()
functions. This is necessary if notifiers or states are
modified. Within these sections the cpu mask may not change.

Switch only between counters in nmi_cpu_switch(), if counters are
running. Otherwise the switch may restart a counter though they are
disabled.

Add nmi_cpu_setup() and nmi_cpu_shutdown() to cpu hotplug code. The
function must also be called to avoid uninitialzed counter usage.

Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Robert Richter <robert.richter@amd.com>
2010-05-04 11:37:56 +02:00
..
backtrace.c perf events, x86/stacktrace: Make stack walking optional 2009-12-17 09:56:19 +01:00
init.c
Makefile x86/oprofile: reanaming op_model_athlon.c to op_model_amd.c 2008-07-26 11:48:14 +02:00
nmi_int.c oprofile/x86: protect cpu hotplug sections 2010-05-04 11:37:56 +02:00
nmi_timer_int.c
op_counter.h oprofile: Implement performance counter multiplexing 2009-07-20 16:33:53 +02:00
op_model_amd.c oprofile/x86: remove duplicate IBS capability check 2010-05-04 11:35:29 +02:00
op_model_p4.c oprofile/x86: return -EBUSY if counters are already reserved 2010-05-04 11:35:28 +02:00
op_model_ppro.c oprofile/x86: return -EBUSY if counters are already reserved 2010-05-04 11:35:28 +02:00
op_x86_model.h oprofile/x86: return -EBUSY if counters are already reserved 2010-05-04 11:35:28 +02:00