linux/drivers/cpuidle
Tuukka Tikkanen 0e96d5adcf cpuidle: Fix variable domains in get_typical_interval()
The menu governor uses a static function get_typical_interval() to
try to detect a repeating pattern of wakeups. The previous interval
durations are stored as an array of unsigned ints, but the arithmetic
in the function is performed exclusively as 64 bit values, even when
the value stored in a variable is known not to exceed unsigned int,
which may be smaller and more efficient on some platforms.

This patch changes the types of varibles used to store some
intermediates, the maximum and and the cutoff threshold to unsigned
ints. Average and standard deviation are still treated as 64 bit values,
even when the values are known to be within the domain of unsigned int,
to avoid casts to ensure correct integer promotion for arithmetic
operations.

Signed-off-by: Tuukka Tikkanen <tuukka.tikkanen@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-08-23 00:24:16 +02:00
..
governors cpuidle: Fix variable domains in get_typical_interval() 2013-08-23 00:24:16 +02:00
coupled.c cpuidle / coupled: fix ready counter decrement 2013-01-03 13:11:05 +01:00
cpuidle-calxeda.c cpuidle: calxeda: Add missing __iomem annotation 2013-08-12 11:28:29 +02:00
cpuidle-kirkwood.c cpuidle-kirkwood.c: simplify use of devm_ioremap_resource() 2013-08-14 22:20:06 +02:00
cpuidle-ux500.c ARM: ux500: cpuidle: Move ux500 cpuidle driver to drivers/cpuidle 2013-07-27 07:56:39 +02:00
cpuidle-zynq.c ARM: zynq: Add cpuidle support 2013-06-05 14:04:26 +02:00
cpuidle.c cpuidle: Check if device is already registered 2013-07-15 02:09:48 +02:00
cpuidle.h cpuidle: support multiple drivers 2012-11-15 00:34:23 +01:00
driver.c cpuidle: Comment the driver's framework code 2013-06-11 14:18:33 +02:00
governor.c cpuidle: create bootparam "cpuidle.off=1" 2011-08-03 19:06:36 -04:00
Kconfig cpuidle: Add Kconfig.arm and move calxeda, kirkwood and zynq 2013-07-27 07:56:37 +02:00
Kconfig.arm ARM: ux500: cpuidle: Move ux500 cpuidle driver to drivers/cpuidle 2013-07-27 07:56:39 +02:00
Makefile ARM: ux500: cpuidle: Move ux500 cpuidle driver to drivers/cpuidle 2013-07-27 07:56:39 +02:00
sysfs.c cpuidle: Make cpuidle's sysfs directory dynamically allocated 2013-07-15 02:09:47 +02:00