cpufreq: ondemand: Use hotplug thread infrastructure

The dbs_sync threads caused considerable load, even when ondemand
wasn't even active. Use the hotplug thread infrastructure to park
the threads.

Change-Id: I8e2c780e3f00b73edc0337e01c226386146e0fd4
cpufreq: Fix broken uevents for cpufreq governor and cpu devices

cyanogens uevent commit when the governor changes was rendered
non-working since kitkat (or so) as the uevent filter function
caused events to be dropped. Now hook into cpufreq_core_init()
and cpufreq_add_dev_interface() to create our basic ksets for
cpufreq and cpu devices. Also, we don't need to set environmental
data, so clean it up a bit.

This commit requires a change in ueventd.rc that add rules for
several files of interest.

Change-Id: I3aafa0d4e18363e1d68535f513099ecd27024007
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
msm: rq_stats: Calculate load based on current freq limit

Prior to this patch, load has been calculated based on an
initial value of policy.cpuinfo.max_freq. This value may
change for several reasons: userspace settings or thermal
throttling (hello hammerhead!). This results in unreliable
calculations that confuse mpdecision which accesses
/sys/devices/system/cpu/cpu0/rq-stats/* for stats info.
Consider current policy.max to fix this behaviour.

Change-Id: Iae1f2fc7f4aa470f7e80371c1ebcf7be423f51ca
msm: kgsl: Fix nice level for higher priority GPU start thread

Before, we were actually setting the lowest possible priority.

Change-Id: I3a52de949eee0faea8061dd91ed303fa8231f0d4
sched: Remove get_online_cpus() usage

Change-Id: Ia1b90b8c107103e605ab6d463f53b8181a5110a9
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: kgsl: Use high priority workqueue

Change-Id: I91958252c039e440082ee274f600c4a1374a059d
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
PM / devfreq: Fix simple_ondemand crashing

Change-Id: I6df4a8e9d4d215c8ae9a749b5b183b1c38644674
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
PM: devfreq: Fix show available freqs

Change-Id: Ifd6956ca4e5a6d03d925ea721afe7737dadfdb77
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
PM: devfreq: Add conservative governor

A GPU governor is not rocket science. This one gets the job done pretty
smoothly while complying with devfreq framework rules.
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>

Change-Id: I47736f1486c278b0e2ecd8d5bcd1e7f0c228277b
PM: devfreq: Add some conservativeness

Change-Id: I8de155d28c2fdb41fb6627b079ea5ec655a752d4
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
PM: devfreq: Always reflect a change of polling interval

Change-Id: I5071026ebf319c57bd2c2fabf673b9bc00896a52
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
PM: devfreq: conservative: Return 0 if GPU just started

Bailing out early is perfectly fine, so do not trigger an error in
update_devfreq.

Change-Id: Ie5178b690e6bc959bdae98970ab981e68809f922
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
PM: devfreq: Add sysfs nodes for devfreq governors

Change-Id: Ib0efe5ff5f5a741a9c35f9601803d0cb0d9e7d11
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm: clock-krait-8974: User voltage control for msm-cpufreq device

Change-Id: Ifd237145d8b497a9a14da3f24c2dcb7cdc1f488d
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
cpufreq: enable sibling cpu policy sharing

disable Qualcomm's cpu policy restore (conflicts with sibling sharing)

Change-Id: I0e41bd16c2f4216d0f2d26503d601ad0e445e9bd
Signed-off-by: Paul Reioux <reioux@gmail.com>
arch/arm/boot/dts: adjust the regulator settings to support OC

Change-Id: Ia44ebaf57db0061bdebfae7f7e7688cd141b52db
arch/arm/Kconfig: enable unaligned capability for ARM

Change-Id: I7d64ccd1eee4cd020ee46ec960c0e97f46d68a1a
Signed-off-by: faux123 <reioux@gmail.com>
ARM: 7583/1: decompressor: Enable unaligned memory access for v6 and above

Modern GCC can generate code which makes use of the CPU's native
unaligned memory access capabilities.  This is useful for the C
decompressor implementations used for unpacking compressed kernels.

This patch disables alignment faults and enables the v6 unaligned
access model on CPUs which support these features (i.e., v6 and
later), allowing full unaligned access support for C code in the
decompressor.

The decompressor C code must not be built to assume that unaligned
access works if support for v5 or older platforms is included in
the kernel.

For correct code generation, C decompressor code must always use
the get_unaligned and put_unaligned accessors when dealing with
unaligned pointers, regardless of this patch.

Change-Id: Ieb20352f76efe3272920e73e5f38f2ef7f45e117
Signed-off-by: Dave Martin <dave.martin@linaro.org>
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Optimized ARM RWSEM algorithm

RWSEM implementation for ARM using atomic functions.
Heavily based on arch/sh/include/asm/rwsem.h

Change-Id: I0e836157618a9757b5fe8ff1c799524b2dfda83b
Signed-off-by: Ashwin Chaugule <ashwinc@codeaurora.org>