linux/arch/x86/oprofile
Maarten Lankhorst 1d12d35284 oprofile, x86: Convert memory allocation to static array
On -rt, allocators don't work from atomic context any more,
and the maximum size of the array is known at compile time.

Call trace on a -rt kernel:

oprofile: using NMI interrupt.
BUG: sleeping function called from invalid context at kernel/rtmutex.c:645
in_atomic(): 1, irqs_disabled(): 1, pid: 0, name: kworker/0:1
Pid: 0, comm: kworker/0:1 Tainted: G         C  3.0.0-rt3-patser+ #39
Call Trace:
 <IRQ>  [<ffffffff8103fc0a>] __might_sleep+0xca/0xf0
 [<ffffffff8160d424>] rt_spin_lock+0x24/0x40
 [<ffffffff811476c7>] __kmalloc+0xc7/0x370
 [<ffffffffa0275c85>] ? ppro_setup_ctrs+0x215/0x260 [oprofile]
 [<ffffffffa0273de0>] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
 [<ffffffffa0275c85>] ppro_setup_ctrs+0x215/0x260 [oprofile]
 [<ffffffffa0273de0>] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
 [<ffffffffa0273de0>] ? oprofile_cpu_notifier+0x60/0x60 [oprofile]
 [<ffffffffa0273ea4>] nmi_cpu_setup+0xc4/0x110 [oprofile]
 [<ffffffff81094455>] generic_smp_call_function_interrupt+0x95/0x190
 [<ffffffff8101df77>] smp_call_function_interrupt+0x27/0x40
 [<ffffffff81615093>] call_function_interrupt+0x13/0x20
 <EOI>  [<ffffffff8131d0c4>] ? plist_check_head+0x54/0xc0
 [<ffffffff81371fe8>] ? intel_idle+0xc8/0x120
 [<ffffffff81371fc7>] ? intel_idle+0xa7/0x120
 [<ffffffff814a57b0>] cpuidle_idle_call+0xb0/0x230
 [<ffffffff810011db>] cpu_idle+0x8b/0xe0
 [<ffffffff815fc82f>] start_secondary+0x1d3/0x1d8

Signed-off-by: Maarten Lankhorst <m.b.lankhorst@gmail.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
2011-08-01 22:54:19 +02:00
..
backtrace.c x86, perf: Make copy_from_user_nmi() a library function 2011-07-21 20:41:57 +02:00
init.c x86: coding style fixes to arch/x86/oprofile/init.c 2008-04-17 17:40:49 +02:00
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: Fix race in nmi handler while starting counters 2011-06-15 14:31:29 +02:00
nmi_timer_int.c x86, NMI: Add priorities to handlers 2011-01-07 15:08:52 +01:00
op_counter.h oprofile, x86: Allow setting EDGE/INV/CMASK for counter events 2011-03-24 18:45:44 +01:00
op_model_amd.c oprofile, x86: Add comments to IBS LVT offset initialization 2011-05-30 16:36:54 +02:00
op_model_p4.c Kill off warning: ‘inline’ is not at beginning of declaration 2011-01-19 15:43:08 +01:00
op_model_ppro.c oprofile, x86: Convert memory allocation to static array 2011-08-01 22:54:19 +02:00
op_x86_model.h oprofile/x86: make AMD IBS hotplug capable 2010-05-06 15:11:15 +02:00