Update idle code
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
ARM: Move leds idle start/stop calls to idle notifiers

Change-Id: I5d8e4e85b17bbab7992ecb477f0bdb5e4138b166
Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	arch/arm/kernel/process.c
ARM: idle: call idle notifiers before stopping nohz tick

If an idle notifier modifies a timer, calling the notifier after
the sched tick has been stopped may leave the sched tick set too
early. Move teh idle notifier call before the call to
tick_nohz_stop_sched_tick.

Change-Id: I0db3284bec6d0193bc5e2a57650ab06bd8342319
Signed-off-by: Colin Cross <ccross@android.com>
PM: Introduce library for device-specific OPPs (v7)

SoCs have a standard set of tuples consisting of frequency and
voltage pairs that the device will support per voltage domain. These
are called Operating Performance Points or OPPs. The actual
definitions of OPP varies over silicon versions. For a specific domain,
we can have a set of {frequency, voltage} pairs. As the kernel boots
and more information is available, a default set of these are activated
based on the precise nature of device. Further on operation, based on
conditions prevailing in the system (such as temperature), some OPP
availability may be temporarily controlled by the SoC frameworks.

To implement an OPP, some sort of power management support is necessary
hence this library depends on CONFIG_PM.

Contributions include:
Sanjeev Premi for the initial concept:
	http://patchwork.kernel.org/patch/50998/
Kevin Hilman for converting original design to device-based.
Kevin Hilman and Paul Walmsey for cleaning up many of the function
abstractions, improvements and data structure handling.
Romit Dasgupta for using enums instead of opp pointers.
Thara Gopinath, Eduardo Valentin and Vishwanath BS for fixes and
cleanups.
Linus Walleij for recommending this layer be made generic for usage
in other architectures beyond OMAP and ARM.
Mark Brown, Andrew Morton, Rafael J. Wysocki, Paul E. McKenney for
valuable improvements.

Discussions and comments from:
http://marc.info/?l=linux-omap&m=126033945313269&w=2
http://marc.info/?l=linux-omap&m=125482970102327&w=2
http://marc.info/?t=125809247500002&r=1&w=2
http://marc.info/?l=linux-omap&m=126025973426007&w=2
http://marc.info/?t=128152609200064&r=1&w=2
http://marc.info/?t=128468723000002&r=1&w=2
incorporated.

v1: http://marc.info/?t=128468723000002&r=1&w=2

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
power: Add option to log time spent in suspend

prints the time spent in suspend in the kernel log, and
keeps statistics on the time spent in suspend in
/sys/kernel/debug/suspend_time

Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	kernel/power/Makefile
Add missing file for last commit
ext4: check for ext[23] file system features when mounting as ext[23] - modified for DHD by LorD ClockaN

    Provide better emulation for ext[23] mode by enforcing that the file
    system does not have any unsupported file system features as defined
    by ext[23] when emulating the ext[23] file system driver when
    CONFIG_EXT4_USE_FOR_EXT23 is defined.

    This causes the file system type information in /proc/mounts to be
    correct for the automatically mounted root file system.  This also
    means that "mount -t ext2 /dev/sda /mnt" will fail if /dev/sda
    contains an ext3 or ext4 file system, just as one would expect if the
    original ext2 file system driver were in use.

    Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
modified CIFS to use workqueue instead of slow work - Imoseyon
Update defconfig
*PM_OPP = y
*Build CIFS as module
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
UPDATE: Cleanups
FIX: Repaired previous patch regarding async.c
Revert "Few more LMK changes"
This is no good... dmesg told me so.

This reverts commit 38b5cfc3551778a97fd71182591d7b0362c9ac16.
PM: Add workaround for Audio HW floating bug
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
cgroup: speed up access to cgroupfs mounted entries in /proc/mounts

Introduce a new fine-grained lock to protect only the informations
exported to /proc/mounts.

This allows to read /proc/mounts without acquiring the global
cgroup_mutex lock.

Signed-off-by: Andrea Righi <andrea@betterlinux.com>
nohz: Fix stale jiffies update in tick_nohz_restart()

commit 6f103929f8979d2638e58d7f7fda0beefcb8ee7e upstream.

Fix tick_nohz_restart() to not use a stale ktime_t "now" value when
calling tick_do_update_jiffies64(now).

If we reach this point in the loop it means that we crossed a tick
boundary since we grabbed the "now" timestamp, so at this point "now"
refers to a time in the old jiffy, so using the old value for "now" is
incorrect, and is likely to give us a stale jiffies value.

In particular, the first time through the loop the
tick_do_update_jiffies64(now) call is always a no-op, since the
caller, tick_nohz_restart_sched_tick(), will have already called
tick_do_update_jiffies64(now) with that "now" value.

Note that tick_nohz_stop_sched_tick() already uses the correct
approach: when we notice we cross a jiffy boundary, grab a new
timestamp with ktime_get(), and *then* update jiffies.

Signed-off-by: Neal Cardwell <ncardwell@google.com>
Cc: Ben Segall <bsegall@google.com>
Cc: Ingo Molnar <mingo@elte.hu>
Link: http://lkml.kernel.org/r/1332875377-23014-1-git-send-email-ncardwell@google.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sched: Fix nohz load accounting -- again!

commit c308b56b5398779cd3da0f62ab26b0453494c3d4 upstream.
[ backported to 3.0 by Kerin Millar <kerframil@gmail.com>]

Various people reported nohz load tracking still being wrecked, but Doug
spotted the actual problem. We fold the nohz remainder in too soon,
causing us to loose samples and under-account.

So instead of playing catch-up up-front, always do a single load-fold
with whatever state we encounter and only then fold the nohz remainder
and play catch-up.

Reported-by: Doug Smythies <dsmythies@telus.net>
Reported-by: LesÅ=82aw Kope=C4=87 <leslaw.kopec@nasza-klasa.pl>
Reported-by: Aman Gupta <aman@tmm1.net>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/n/tip-4v31etnhgg9kwd6ocgx3rxl8@git.kernel.org
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Kerin Millar <kerframil@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>

Conflicts:
	kernel/sched.c

Conflicts:
	kernel/sched.c
Tweak BFQ thanks to franco
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
Dont call task_group() many times
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
speed up /proc/stat and optimize vsprintf
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>
proc: enhance time-average nr_running stats
Signed-off-by: scotthartbti <scott.hart.bti@gmail.com>