cpufreq: conservative: update frequency when limits are relaxed

Reevaluate CPU load and update frequency immediately whenever limits
are changed. Currently conservative doesn't do that when limits are
relaxed, wasting power on systems with relatively low sampling rate.

Signed-off-by: Michal Pecio <mpecio@nvidia.com>
Reviewed-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
PM / cpufreq: Initialise the cpu field during conservative governor start

This change initialises the cpu id field of cs_cpu_dbs_info structure in
conservative governor and keep this consistent with other governors.
Similar initialisation is present in ondemand governor.

Signed-off-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Revert "cpufreq: cpu-boost: Fix cores getting stuck"

This reverts commit b84bb5a1cbe8ad46a69692da1d96e57008926760.
Revert "cpufreq: cpu-boost: Re-issue boosts above minimum frequency"

This reverts commit dee07a82d4c96f73f395ec9d7ec9e5353971e35d.
Revert "cpufreq: cpu-boost: Remove unused waitqueue"

This reverts commit 6dcde4e3da20a9ce64e1ffa4fb584d6e13b2bdc9.
Revert "cpufreq: cpu-boost: Fix queue_delayed_work_on() race with hotplug"

This reverts commit 2a1c013b0d3ff1547e45276e32dd56ad366108f5.
Revert "cpufreq: cpu-boost: Use hotplug thread infrastructure"

This reverts commit b86a8fc3af582ad609c70c36e07d399374556dcf.

Conflicts:
	drivers/cpufreq/cpu-boost.c
Revert "cpufreq: Disable cpu-boost by default"

This reverts commit 4be10c86df6656bd5964251426ebcb0a9764e07d.
Revert "cpufreq: Add Input Boost feature to the cpu-boost driver"

This reverts commit e5b06431d09452b046713c4af5eb0c244811975c.
Revert "cpufreq: Add a sync limit to cpu-boost"

This reverts commit fa35b5f0a9c67c418747059014cd5f7cd84868f0.
Revert "cpufreq: Add cpu-boost driver"

This reverts commit fcd34f3f59677cbfd0de3c85e2803ea40f44e0f7.
cpufreq: conservative: set default min_sample_rate to 50mS
ak_mako_defconfig: disable QUEUE_STATS
arm: mach-msm: decouple QCACHE from MSM board
kernel: timer: Optimize apply_slack() for size and speed
mmc: decrease wakelock timeout
suspend: shorten time to enter sleep state

Conflicts:

	kernel/power/process.c

Signed-off-by: Luis Cruz <ljc2491@gmail.com>

Conflicts:

	kernel/power/process.c
ARM: mm: remove IPI broadcasting on ASID rollover

ASIDs are allocated to MMU contexts based on a rolling counter. This
means that after 255 allocations we must invalidate all existing ASIDs
via an expensive IPI mechanism to synchronise all of the online CPUs and
ensure that all tasks execute with an ASID from the new generation.

This patch changes the rollover behaviour so that we rely instead on the
hardware broadcasting of the TLB invalidation to avoid the IPI calls.
This works by keeping track of the active ASID on each core, which is
then reserved in the case of a rollover so that currently scheduled
tasks can continue to run. For cores without hardware TLB broadcasting,
we keep track of pending flushes in a cpumask, so cores can flush their
local TLB before scheduling a new mm.

CRs-Fixed: 623919

Change-Id: I2ed0f2ab6635bf900bcb81e29efbd01991da8e86
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Tested-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: b5466f8728527a05a493cc4abe9e6f034a1bbaab
Git-repo: https://android.googlesource.com/kernel/common/
[spathi@codeaurora.org: removed unused function set_asid().
The function cpu_set_reserved_ttbr0() is not available since patch
"ARM: Use TTBR1 instead of reserved context ID" is not merged
so used old functionlity by calling cpu_set_asid(0)]
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
msm: rpm-smd: Configure WQ for higer priority

When the workqueue runs at a lower priority, it gets starved by higher
priority threads. Bump the WQ priority to high to ensure rpm smd work
queue gets a fair chance

Change-Id: I06b864611cf45afe6931d6030327806032894663
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
(cherry picked from commit e0eccf8f6dece61cdb639c4b43374c34c3acf3ea)
tick: Dynamically set broadcast irq affinity

When a cpu goes to a deep idle state where its local timer is
shutdown, it notifies the time frame work to use the broadcast timer
instead.  Unfortunately, the broadcast device could wake up any CPU,
including an idle one which is not concerned by the wake up at all. So
in the worst case an idle CPU will wake up to send an IPI to the CPU
whose timer expired.

Provide an opt-in feature CLOCK_EVT_FEAT_DYNIRQ which tells the core
that is should set the interrupt affinity of the broadcast interrupt
to the cpu which has the earliest expiry time. This avoids unnecessary
spurious wakeups and IPIs.

[ tglx: Adopted to cpumask rework, silenced an uninitialized warning,
  massaged changelog ]

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: viresh.kumar@linaro.org
Cc: jacob.jun.pan@linux.intel.com
Cc: linux-arm-kernel@lists.infradead.org
Cc: santosh.shilimkar@ti.com
Cc: linaro-kernel@lists.linaro.org
Cc: patches@linaro.org
Cc: rickard.andersson@stericsson.com
Cc: vincent.guittot@linaro.org
Cc: linus.walleij@stericsson.com
Cc: john.stultz@linaro.org
Link: http://lkml.kernel.org/r/1362219013-18173-3-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Change-Id: I6a880a39dd595526b80a6d72b88be74163513da9
Signed-off-by: Karthik Parsha <kparsha@codeaurora.org>
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>