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
..
2009-08-20 10:29:28 +10:00
2009-08-20 10:29:28 +10:00
2008-10-07 14:26:18 +11:00
2009-05-21 15:44:26 +10:00
2009-08-20 11:07:56 +10:00
2007-05-11 05:38:25 -04:00
2008-08-20 16:34:57 +10:00
2009-01-13 14:48:02 +11:00
2009-01-08 16:25:10 +11:00
2007-10-03 09:11:56 +10:00
2007-05-11 05:38:25 -04:00
2009-08-20 10:12:27 +10:00
2009-02-14 14:41:29 -05:00
2009-06-15 21:45:30 -05:00
2007-04-24 21:31:49 +10:00
2008-09-15 11:08:35 -07:00
2009-08-28 14:24:13 +10:00
2009-02-23 10:48:56 +11:00
2008-06-30 22:31:00 +10:00
2009-02-23 15:53:03 +11:00
2009-08-28 14:24:10 +10:00
2009-08-28 14:24:11 +10:00
2009-08-28 14:24:11 +10:00
2009-08-20 10:12:27 +10:00
2009-08-20 10:25:11 +10:00
2009-08-28 14:24:14 +10:00
2009-08-20 11:07:56 +10:00
2006-06-30 19:25:36 +02:00
2009-08-20 10:12:27 +10:00
2009-06-20 10:56:46 -07:00
2009-08-20 10:12:27 +10:00
2009-08-20 10:12:27 +10:00
2009-08-20 10:12:27 +10:00
2009-08-27 13:12:51 +10:00
2009-08-20 10:25:11 +10:00
2009-08-20 10:12:27 +10:00
2009-09-02 16:20:41 +10:00
2009-08-28 14:24:10 +10:00
2008-09-03 20:53:47 +10:00
2008-09-03 20:53:47 +10:00
2007-05-07 20:31:13 +10:00
2008-11-20 10:51:15 -08:00
2009-06-16 19:47:28 -07:00
2008-05-23 22:43:11 +02:00
2007-09-20 07:36:52 -05:00
2009-01-13 14:47:59 +11:00
2009-06-12 16:53:38 +10:00
2008-05-09 20:22:59 +10:00
2008-09-26 10:36:41 -05:00
2009-01-07 11:31:52 -08:00
2007-10-19 23:21:04 +02:00
2008-07-28 16:30:53 +10:00
2009-09-02 16:19:01 +10:00
2008-08-15 08:35:42 -07:00
2008-12-23 15:13:29 +11:00
2009-05-15 16:43:41 +10:00
2009-08-28 14:24:15 +10:00
2009-08-27 13:12:52 +10:00
2009-06-09 16:46:25 +10:00
2008-09-15 11:08:35 -07:00
2008-11-20 10:52:53 -08:00
2009-02-23 10:48:56 +11:00
2009-06-12 21:47:05 +09:30
2009-08-06 13:55:09 +02:00
2009-03-25 08:54:29 -07:00
2007-08-17 11:01:52 +10:00
2009-06-26 16:55:35 +10:00
2009-09-02 15:45:53 +10:00
2009-08-20 10:25:08 +10:00
2009-09-02 15:45:53 +10:00
2009-09-02 15:45:53 +10:00
2009-05-21 15:44:24 +10:00
2009-08-28 14:24:15 +10:00
2009-09-02 15:45:53 +10:00
2009-08-18 14:48:47 +10:00
2009-09-11 11:27:59 +10:00
2008-02-05 23:34:14 -06:00
2009-08-06 13:55:09 +02:00
2009-08-06 13:55:09 +02:00
2009-08-06 13:55:09 +02:00
2009-08-06 13:55:09 +02:00
2009-08-06 13:55:09 +02:00
2008-07-01 11:28:50 +10:00
2009-08-06 13:55:09 +02:00
2009-01-08 16:25:17 +11:00
2008-12-23 15:13:28 +11:00
2008-04-29 08:06:22 -07:00
2009-08-20 10:12:43 +10:00
2009-03-11 17:11:33 +11:00
2009-08-20 10:29:25 +10:00
2009-04-20 12:18:43 -06:00
2009-06-09 16:47:38 +10:00
2009-07-12 12:22:34 -07:00
2009-07-15 17:41:45 +10:00
2008-09-15 11:08:38 -07:00
2009-03-31 01:14:44 +04:00
2009-05-21 15:44:23 +10:00
2008-05-14 22:31:59 +10:00
2006-06-09 21:21:06 +10:00
2009-09-02 16:19:01 +10:00
2009-06-26 14:37:27 +10:00
2009-08-20 10:25:11 +10:00
2009-04-07 15:18:58 +10:00
2006-05-19 15:02:12 +10:00
2009-03-27 16:58:24 +11:00
2009-03-27 16:58:24 +11:00
2009-03-27 16:58:24 +11:00
2009-03-27 16:58:24 +11:00
2008-11-05 22:08:28 +11:00
2009-09-11 11:27:57 +10:00
2008-09-06 19:30:24 +01:00
2008-07-28 16:30:47 +10:00
2008-07-24 10:47:21 -07:00
2008-12-21 14:21:16 +11:00
2007-05-07 20:31:14 +10:00
2008-10-07 14:26:20 +11:00
2008-12-21 14:21:15 +11:00
2009-08-20 10:12:34 +10:00
2008-07-09 16:30:45 +10:00
2009-09-11 11:27:58 +10:00
2008-01-25 22:52:50 +11:00
2008-01-25 22:52:50 +11:00
2007-10-11 14:36:47 +10:00
2008-06-26 11:24:38 +02:00
2009-08-28 14:25:04 +10:00
2009-06-09 13:29:25 +10:00
2009-06-26 16:55:35 +10:00
2009-03-11 17:11:34 +11:00
2009-08-20 10:12:24 +10:00
2009-08-20 10:12:27 +10:00
2009-08-28 14:24:10 +10:00
2009-08-20 10:29:29 +10:00