Makefiles: Add Linaro Build Flags
Restrict slave mountspace so Dalvik apps can mount system-wide volumes

Android 4.2 implements multi-user storage using per-process mount
namespaces.  Everything under "/" (the entire filesystem hierarchy) is
marked as a recursive-slave mountspace for all zygote instances.  This
is done so that user-storage sandbox mounts under /storage/emulated are
hidden from other apps and users.

Unfortunately this means that any Dalvik app (actually, any program
whose clone/fork ancestry includes a Dalvik zygote, which is everything
except services spawned directly from init) cannot mount system-wide
volumes. Thus, apps like CifsManager are effectively broken in Android
4.2, since its cifs mounts are only visible to the CifsManager app
itself.  All other apps see empty mountpoints instead of the mounted
volume.  Furthermore, Linux provides no provision for a process to
"escape" a recursive-slave mountspace in versions prior to Linux 3.8
(setns syscall).

Here, we restrict rootfs-slave calls to /storage (and, due to a possible
kernel bug, /mnt/shell/emulated) so that Dalvik apps can mount
system-wide volumes elsewhere (with appropriate permission, as in
earlier versions of Android), while retaining full multi-user storage
compatibility.  It is made available as a kernel-based workaround for
instances where libdvm can not be modified.

This change requires that a tmpfs volume is mounted as /storage in
init.rc. If this volume is unavailable, then we falls back to the
previous behavior of marking the entire filesystem hierarchy as slave.
config: Remove unused MEDIA_TUNER option

Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
msm: cpufreq: Initialize cpufreq driver early at boot

MSM cpufreq driver registering with the CPUFreq framework during
late_initcall() may cause the device to be available a few seconds after
the clock driver is ready for changing frequency. This could be bad for
boot and/or thermal performance, since the cpu will continue to boot at
whatever frequency the bootloaders set it to.

Initialize cpufreq driver as part of device_initcalL() but only after
all the clock drivers have had a chance to initialize their devices.

Change-Id: Iaa4867108f59a368ee5b511d35ea2e8e219d39d3
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
KGSL: Simple Governor: some styling changes, early returns instead of assigning a val and returning in the end of the function call and change the copyright/author from the middle of the file to the header.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
KGSL: Simple Governor: so I kinda butchered in a good way of course the original code from faux, but the simplicity is still here. Added an history so that we can track the average do that the frequency scaling is much more proporcional to the actual GPU load rather than having is ramp up every now and then due to spurious load spike. Also remove two useless ifs.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
acpuclock: Set 192mhz min freq, also deactivate some unused Frequencies like in my 4.2.2 Kernel.
acpuclock: 100mV UV
cpufreq: Add a boostpulse interface to ondemand

For applications that require a one-shot increase in frequency,
the boostpulse interface would help to scale to max for the time
specified in boostime. This helps applications that currently
increases scaling_min_freq and resets later after a fixed duration.
Instead of changing scaling_min_freq applications can directly write
to boostpulse and governer resets during regular timer after the time
expires.

Change-Id: Ie5f490ff06b41364aa76dd468573433495da28a4
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
cpufreq: notify avg load for short sampling_rate

If the sampling rate is less than 50ms reporting
the actual load may lead to poor decision making
at user space. So, for sampling rates less than 50ms
report the average of load across two samples.

Change-Id: I0d1cf00801732bee8e4380158d7e892758226594
Signed-off-by: Narayanan Gopalakrishnan <nargop@codeaurora.org>
cpufreq: ondemand: Fix the boostpulse interface

Change-Id: I86ad61f462f23c5f9a32b12e4f64f33fc391c8f8
cpufreq: ondemand: Add duration for boosting

Change-Id: I838d58edd8107adf726d2991d74f7bfd3927ea87
drivers/cpufreq: Add max duration for boosting

Change-Id: I87b180ecf52bf1dfe8e3bfe3be8731fea888e600
cpufreq: ondemand: freq_boosted_time should be static (thx myfluxi)