linux-uconsole/drivers/oprofile
Will Deacon d2b3216795 oprofile: perf: use NR_CPUS instead or nr_cpumask_bits for static array
commit e734568b67 upstream.

The OProfile perf backend uses a static array to keep track of the
perf events on the system. When compiling with CONFIG_CPUMASK_OFFSTACK=y
&& SMP, nr_cpumask_bits is not a compile-time constant and the build
will fail with:

oprofile_perf.c:28: error: variably modified 'perf_events' at file scope

This patch uses NR_CPUs instead of nr_cpumask_bits for the array
initialisation. If this causes space problems in the future, we can
always move to dynamic allocation for the events array.

Cc: Matt Fleming <matt@console-pimps.org>
Reported-by: Russell King - ARM Linux <linux@arm.linux.org.uk>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 08:47:48 -07:00
..
buffer_sync.c oprofile: Fix locking dependency in sync_start() 2011-05-31 16:33:34 +02:00
buffer_sync.h cpumask: modifiy oprofile initialization 2009-01-22 14:37:06 +01:00
cpu_buffer.c oprofile: Introduce new oprofile sample add function (oprofile_add_ext_hw_sample) 2011-02-15 11:07:07 +01:00
cpu_buffer.h oprofile: Remove deprecated use of flush_scheduled_work() 2010-10-29 11:54:18 +02:00
event_buffer.c oprofile: make event buffer nonseekable 2010-07-26 10:58:24 +02:00
event_buffer.h oprofile: Use linux/mutex.h 2011-05-24 12:45:59 +02:00
oprof.c oprofile: Fix crash when unloading module (hr timer mode) 2011-12-09 08:52:50 -08:00
oprof.h oprofile, s390: Rework hwsampler implementation 2011-02-15 11:10:20 +01:00
oprofile_files.c oprofile: Fix uninitialized memory access when writing to writing to oprofilefs 2012-01-06 14:13:51 -08:00
oprofile_perf.c oprofile: perf: use NR_CPUS instead or nr_cpumask_bits for static array 2012-07-16 08:47:48 -07:00
oprofile_stats.c percpu: make percpu symbols in oprofile unique 2009-10-29 22:34:13 +09:00
oprofile_stats.h oprofile: Adding switch counter to oprofile statistic variables 2009-07-20 16:43:21 +02:00
oprofilefs.c oprofile: Fix uninitialized memory access when writing to writing to oprofilefs 2012-01-06 14:13:51 -08:00
timer_int.c oprofile: Fix crash when unloading module (hr timer mode) 2011-12-09 08:52:50 -08:00