linux/arch/powerpc
Paul Mackerras e51ee31e8a powerpc/perf_counters: Reduce stack usage of power_check_constraints
Michael Ellerman reported stack-frame size warnings being produced
for power_check_constraints(), which uses an 8*8 array of u64 and
two 8*8 arrays of unsigned long, which are currently allocated on the
stack, along with some other smaller variables.  These arrays come
to 1.5kB on 64-bit or 1kB on 32-bit, which is a bit too much for the
stack.

This fixes the problem by putting these arrays in the existing
per-cpu cpu_hw_counters struct.  This is OK because two of the call
sites have interrupts disabled already; for the third call site we
use get_cpu_var, which disables preemption, so we know we won't
get a context switch while we're in power_check_constraints().
Note that power_check_constraints() can be called during context
switch but is not called from interrupts.

Reported-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Cc: <stable@kernel.org)
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2009-09-11 11:27:59 +10:00
..
boot powerpc/405ex: support cuImage via included dtb 2009-08-31 09:23:22 -04:00
configs powerpc/44x: Add Eiger AMCC (AppliedMicro) PPC460SX evaluation board support. 2009-08-31 08:24:15 -04:00
include/asm powerpc: Fix bug where perf_counters breaks oprofile 2009-09-11 11:27:58 +10:00
kernel powerpc/perf_counters: Reduce stack usage of power_check_constraints 2009-09-11 11:27:59 +10:00
kvm powerpc: Use names rather than numbers for SPRGs (v2) 2009-08-20 10:12:27 +10:00
lib powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
math-emu powerpc/math-emu: Fix efp dependence 2009-03-11 06:00:08 -05:00
mm powerpc/pseries: Fix to handle slb resize across migration 2009-09-02 16:19:01 +10:00
oprofile powerpc: Remove unnecessary semicolons 2009-07-08 13:50:21 +10:00
platforms powerpc: Fix bug where perf_counters breaks oprofile 2009-09-11 11:27:58 +10:00
sysdev powerpc/qe_lib: Set gpio data before changing the direction to output 2009-08-25 21:08:45 -05:00
xmon powerpc: Enable GCOV 2009-08-20 10:29:28 +10:00
Kconfig powerpc: Add CONFIG_DMA_API_DEBUG support 2009-08-28 14:24:11 +10:00
Kconfig.debug powerpc: Add configurable -Werror for arch/powerpc 2009-06-16 14:15:45 +10:00
Makefile powerpc: Makefile simplification through use of cc-ifversion 2009-08-20 10:12:33 +10:00