cpufreq: interactive: add back comments and update to kk_3.5 for a slight bug fix

Change-Id: I754d8fb11e8346256cf210fc47c065b67039459d

Conflicts:
	drivers/cpufreq/cpufreq_interactive.c
cpufreq: interactive: Optimize sync_freq implementation

Don't let frequency drop below sync_freq if either load or
frequency among other cpus is above a certain threshold,
not necessarily both.

Change-Id: Iada28e08e812498e16d5189b309a7314f88814dd
cpufreq: interactive: don't schedule timer on offline cpu

It shall not add timer on an offline CPUs, else it will cause
kernel panic.

And also don't reschedule the timer on an offline cpu in idle
and timer callback. Actually the timer shall be cancelled when
cpu is offline.

Change-Id: Id314f15be3d12ab49e5cdcf6ae89bd88b376308a
Signed-off-by: Lianwei Wang <a22439@motorola.com>
Reviewed-on: http://gerrit.pcs.mot.com/539160
SLT-Approved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Jeffrey Carlyle <jeff.carlyle@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
interactive: import myfluxi's gov

Conflicts:
	drivers/cpufreq/cpufreq_interactive.c
interactive: Import neobuddy89's governor based on myfluxi and crpalmer's
interactive: add back get_cpu_idle_time_jiffy
interactive: add governor from franciscofranco
interactive: add back get_cpu_idle_time_jiffy
cpufreq: interactive: reformat the calculation. Functionality is unchanged - purely asthetical

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: add franco's latest interactive governor
Cpufreq: interactive: Check actual freq before setting new freq

In case Actual freq is not updated till next timer interrupt
and new target freq comes same as actual freq.
Don't go for setting same frequency again.

Bug 1316765

Reviewed-on: http://git-master/r/249103
(cherry picked from commit d5a4d9622c27db40334ba2df3503c2d2e7457bcb)

Change-Id: If81786911fd85adb8469b49c59f2ab70ae12f96a
Signed-off-by: Prashant Gaikwad <pgaikwad@nvidia.com>
Signed-off-by: Puneet Saxena <puneets@nvidia.com>
Reviewed-on: http://git-master/r/254352
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
cpufreq: interactive: clean up unused options. This prevent users to be confused.

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: create a helper function to get CPU utilization. Picked from @stratosk

Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: Move get_cpu_idle_time() to cpufreq.c

Governors other than ondemand and conservative can also use
get_cpu_idle_time() and they aren't required to compile
cpufreq_governor.c. So, move these independent routines to
cpufreq.c instead.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Git-commit: 72a4ce340a7ebf39e1c6fdc8f5feb4f974d6c635
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[junjiew@codeaurora.org: update non-upstream files]
Signed-off-by: Junjie Wu <junjiew@codeaurora.org>

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

Conflicts:
	arch/arm/mach-msm/msm_rq_stats.c
	drivers/cpufreq/cpufreq.c
	drivers/cpufreq/cpufreq_conservative.c
	drivers/cpufreq/cpufreq_interactive.c
	drivers/cpufreq/cpufreq_ondemand.c
	include/linux/cpufreq.h

Conflicts:
	arch/arm/mach-msm/msm_rq_stats.c
m8: upstream to latest bacon cpufreq and mako hotplug

Conflicts:
	arch/arm/kernel/mako_hotplug.c
	drivers/cpufreq/cpufreq.c
cpufreq: Always allow update of user policy

In the cases where the system boots up in a constraint with policy min and
max lower than cpuinfo min/max, and user tries to set a higher user
policy min, the value would be overridden during the verifying the
limits.

Once user initiates the sysfs write the previous user policy is
maintained in policy min and max thus changing the limits for verification
of the current policy. Once the verification is completed restore the
current user policy min/max with the updated values if any. This would take
care of cases uwhere user policy min/max input is higher/lesser than the
current min and max.

Change-Id: I5ad92ba05162cb5c32c3ba3fdae21d2e505493d3
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: Export user_policy min/max

Add sysfs nodes for user_policy min and max settings.

Bug 888312

Change-Id: Ife8ec07f8faebc0c04e7ecf6e24976a311bad73b
Reviewed-on: http://git-master/r/72201
Signed-off-by: Antti P Miettinen <amiettinen@nvidia.com>
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Reviewed-on: http://git-master/r/75882
Reviewed-by: Automatic_Commit_Validation_User

Rebase-Id: Rf145967a22a5d871d01bb1334a2e7d366a6612fd

Conflicts:
	drivers/cpufreq/cpufreq.c

Conflicts:
	drivers/cpufreq/cpufreq.c