userns: Add kuid_t and kgid_t and associated infrastructure in uidgid.h

Start distinguishing between internal kernel uids and gids and
values that userspace can use.  This is done by introducing two
new types: kuid_t and kgid_t.  These types and their associated
functions are infrastructure are declared in the new header
uidgid.h.

Ultimately there will be a different implementation of the mapping
functions for use with user namespaces.  But to keep it simple
we introduce the mapping functions first to separate the meat
from the mechanical code conversions.

Export overflowuid and overflowgid so we can use from_kuid_munged
and from_kgid_munged in modular code.

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
userns: Add a Kconfig option to enforce strict kuid and kgid type checks

Make it possible to easily switch between strong mandatory
type checks and relaxed type checks so that the code can
easily be tested with the type checks and then built
with the strong type checks disabled so the resulting
code can be used.

Require strong mandatory type checks when enabling the user namespace.
It is very simple to make a typo and use the wrong type allowing
conversions to/from userspace values to be bypassed by accident,
the strong type checks prevent this.

Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Added BITS_PER_LONG_LONG definition avoiding lib/vsprintf.c errors.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Squash vsprintf from upstream.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Update .gitignore.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
lib: vsprintf: remove warning.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
cpufreq: add generic get_cpuidle_time to the cpufreq headers so that we don't need to implement this everytime we need it.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
msm: cpufreq: add min freq limit helper and remove useless unused code.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
msm: do not compile rq_stats.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Remove load_stats file as we're not going to use it anymore, instead its functionality is being somewhat merged to the hotplug driver for ease of use and merge to another devices.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
msm: add function prototype.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
cpufreq: interactive: remove get_cpu_idle_time because we're now using the generic version from cpufreq.c. Rework boostpulse to boost directly from the cpufreq target function instead of going through the speedtask thread. Add Thread Migration notifier to boost the target cpu that receives a thread migration to ensure no loss of perceived performance.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
mako_hotplug: uload_stats functionality is now in this driver and now it uses the generic get_cpu_idle_time from cpufreq.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
sound_control: remove useless define.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
sound_control: add workaround to prevent audio resets after using custom values. Based on https://github.com/faux123/Nexus_5/commit/33407fd2d63290540eb0054bc7c6611f2080ea8b

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Temporarily remove suspend_frequency, it seems some users are experiencing audio stutter on screen off if theres a connectivity change eg. Wi-Fi powering up or 2G to 3G.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
msm: mdss: Display gamma control

TODO: confirm rgb channels, identify other tunables, cleanup,
apply values without switching screen (off and) on.

sysfs: /sys/devices/qcom,mdss_dsi_jdi_command_ors.69/*
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
msm: mdss: Apply commands values without switching screen (off and) on

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
msm: mdss: Remove tunable for command 32

Even slight changes look ugly or distort the screen.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
msm: mdss: distinguish between Gamma RGB polarity Positive/Negative

Signed-off-by: Paul Reioux <reioux@gmail.com>
Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>