autosmp: Multi-core automatic hotplug support by mrg666

Squashed, ported to hammerhead by eng.stk <eng.stk@sapo.pt>
autosmp: hammerhead fixes, lcd hooks
defconfig: enable autosmp
msm: thermal: make sure we actually want to go through with the policy adjust since this can be triggered by any policy update with the cPUFREQ_ADJUST flag.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: cpu-boost: Export cpu boost status

* This will help hotplug drivers to know boost status
  of CPU and act accordingly.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: hotplug: Do not butcher boosted CPU

* In existing scenario, we don't check whether CPU is
  booster or not before taking it down.
* Break the loop and wait for next cycle if CPU is
  currently being boosted.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
perf/debug: disable some debug

Following my changes on Bacon, let's disable this here as well

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
bluactive: don't scale beyond min if the load is low

by franciscofranco
defconfig: use smp idle threads
autosmp: suspend/resume and work fixes and improvements
mm: fix prctl_set_vma_anon_name

prctl_set_vma_anon_name could attempt to set the name across
two vmas at the same time due to a typo, which might corrupt
the vma list.  Fix it to use tmp instead of end to limit
the name setting to a single vma at a time.

Change-Id: Ie32d8ddb0fd547efbeedd6528acdab5ca5b308b4
Reported-by: Jed Davis <jld@mozilla.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
drivers: video: Separate LCD notifier define

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

Conflicts:
	drivers/video/msm/mdss/Kconfig
defconfig: enable lcd_notify
msm: cpufreq: Add frequency limiter driver

* This driver limits max frequency on suspend/resume.
* This driver can be used by other boards as well
  since it doesn't contain any function specific to
  msm board.
* We will convert pr_info to pr_debug once tested
  and reviewed.

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

Conflicts:
	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/Makefile
msm: limiter: Update path

* Attributes are created at /sys/kernel/msm_limiter/*

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: limiter: Improve logic and formatting

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: limiter: Cleanup debug prints

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: limiter: Increase constraints prior changing limits

* In very rare instance, resume function causes wdog to reset
  on MSM board and hence a reboot.
* So let resume function execute and restore limits only if
  required.
* Increase suspend defer time to 10 seconds.
  (which is same as that of MSM Hotplug)

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: limiter: Add enable switch and use workqueues

* In case user wish to use external app to set
  min-max frequencies, we should not override.
* Use high priority workqueues for limit work.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
msm: limiter: Fix updation waiting for next cycle

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