Add Thalamus ARM Generic Hotplug interface because its time to get rid of mpdecision. All credits to Thalamus of course.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: Increase sampling time to decrease the number of onlines/offlines; tweak the values for onlining and offlining a single core; instead of staying 2 seconds without offlining cores (after they are either all online or it called boostpulse), they now stay for 5 seconds to reduce onlining/offlining, and it also provides a bigger boost if the device needs that extra burst of performance power for at least those 5 seconds.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: make some constants to be exported to userspace to let users customize them for their own usages.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: just hardcode the value for onlining all the cpus.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: change the thresholds a little bit. Also changed how it behaves when it has 2 cores online. When the screen is touched the avg_running goes up and it onlines cpu1, but we don't want it to go up and down continuously while we are interacting with the device so now while the avg_running is >= 125 (disable_load/2) cpu1 stays online. Only when the avg_running goes below 125 which is mostly possible when we're not interacting with the device (e.g. reading a book or a website) cpu1 goes down, but also takes 3 seconds to go down just in case theres a new interaction in between. This should help a lot on battery life because hotplug is very costy and now it will be called much less than before.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug: remove the extra second for the scheduled delayed work or we could get into trouble.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c make it a little bit more aggressive.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: after boostpulse is done instead of waiting 5 seconds to offline the core, now it offlines after 2 seconds. Average 15 sample times instead of 12. A little change on when to disable a core when the boostpulse flag is not on because since we now average more times now when the avg_running is less than the disable_load and online_cpus > 1 we offline a core.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Conflicts:
	arch/arm/kernel/auto_hotplug.c
auto_hotplug.c: increase the threshold for onlining all cores at the same time.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: these are variables that are only read from, so optimise it.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: this device boots up faster than any other so we can start the hotplug works sooner - sometimes the previous 20 seconds timer started exactly when I started to swipe the App Drawer after the device was booted and that would create a 1 time lag and that was annoying every time I rebooted. Should be ok now.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: we're now scaling the cores based on the NVIDIA's avg_running code so now the driver will be less hard on the system because we got rid of the history cycle and multiplication before deciding when to online/offline cores.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Conflicts:
	arch/arm/kernel/auto_hotplug.c
auto_hotplug.c: remove dynamic sampling time based on online cores and schedule the works in a 100ms sampling rate. Also cleanup how check for boostpulse flag to reduce reduntant function calls. Also reduced enable_all_threshold from 500 to 425 otherwise it would be really hard to have them all enabled at a certain point of time. Maybe it easier to stay on all cores if the load is above the threshold - there was a small bug here that almost prevented all the cores to stay up until the load gets down.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Conflicts:
	arch/arm/kernel/auto_hotplug.c
auto_hotplug.c: ditch NVIDIA's load averaging usage on this driver - according to @thalamus its not cheaper than his original implementation.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: since we're sampling for longer periods and in 100ms rates this can be a little lower if one needs the performance.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: since the sampling rate was adjusted a few patches ago I never got to update the timers in the delayed works to be according the new rate and the more sampling periods. Should be more snappy now when the device needs the extra processing power, without sacrificing battery. Also added contact info in the top of the file and more info regarding OMAP4460.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Conflicts:
	arch/arm/kernel/auto_hotplug.c
auto_hotplug.c: reduce sampling periods from 20 to 15.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: on device resume we feed some fake numbers to the circle buffer to make it more responsive to load changes instead of waiting several sampling rates for a proper response. Thanks @motley for the idea.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: sample less.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
auto_hotplug.c: reduce sampling_periods and add a small routine to feed the history with the current runnable_threads depending on the number of CPU's online. this should definitely boost interactivity. CFBench got a nice score boost (roughly 1k more). Thanks @morfic for the lively discussion on getting to this point.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>