msm: Add CPU freq limiter driver

* When enabled, it will override max frequency on
  resume/suspend events and when explicitly set by user.
* When enabled, it will override min frequency on
  suspend event and when explicitly set by user.
* Enabled by default.
* Interface is generated here: /sys/kernel/msm_limiter

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:
	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/Makefile
msm: limiter: Introduce initial multi cpu control

* This extends current functionality of the driver
  to save min/max freq for each core.
* Disabled by default.
* CPU0 is master boot core for 3.4 kernel and user
  should not reduce max freq of this core more than
  half of range.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: Add interface for gov change

* Interface can be used by drivers to change gov.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: limiter: Add controls for per cpu governor

* Requires hooks in CPUFREQ driver.
* Works without limiter enabled.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
allow all hotplug/cpufreqs to get cpu utilization

Conflicts:
	drivers/cpufreq/cpufreq.c
fixes for cpu utilization
cpufreq: Add interface to set/get min/max freq

* Interface similar to that for setting governor.
* Interface can be used by drivers to change/get
  min/max freq per cpu.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
CPU hotplug, debug: detect imbalance between get_online_cpus() and put_online_cpus()

The synchronization between CPU hotplug readers and writers is achieved
by means of refcounting, safeguarded by the cpu_hotplug.lock.

get_online_cpus() increments the refcount, whereas put_online_cpus()
decrements it.  If we ever hit an imbalance between the two, we end up
compromising the guarantees of the hotplug synchronization i.e, for
example, an extra call to put_online_cpus() can end up allowing a
hotplug reader to execute concurrently with a hotplug writer.

So, add a WARN_ON() in put_online_cpus() to detect such cases where the
refcount can go negative, and also attempt to fix it up, so that we can
continue to run.

Change-Id: I144efeaa5899a2e8a3cddd21f010679cbaaa2459
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Reviewed-by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 075663d19885eb3738fd2d7dbdb8947e12563b68
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Osvaldo Banuelos <osvaldob@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
cpufreq: blu_active initial adaptation

* Experimental. Untouched.
* On user request - so that they can stop spamming thread.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>

Conflicts:
	drivers/cpufreq/Kconfig
	drivers/cpufreq/Makefile
	include/linux/cpufreq.h
fixes for blu_activegovernor