Revert "Added Temp Control version 1."

This reverts commit 1549f623313e6612bfa7ec26c65ec40598ec24af.

Conflicts:
	drivers/misc/Kconfig
	drivers/misc/Makefile
Revert "pvr: omap4: fix building if pvr governor is disabled"

This reverts commit 5fa7dc233a1928f052f30b3e82dc8e12af7f7bf7.
Revert "drivers/gpu/pvr/pvr_governor: add sysfs interface for current GPU freqeuncy"

This reverts commit b87aad509e795bcfc7c85b7d536a153d158728c5.
Revert "drivers/gpu/pvr/pvr_governor: fix sysfs to show "powersave" governor"

This reverts commit 1daba78831fc9a9dd210b55eed526f0e508ca74e.
Revert "drivers/gpu/pvr/pvr_governor: add "powersave" governor as another option"

This reverts commit 56de6babbe00933192d2739de3538afdf40557be.
Revert "drivers/gpu/pvr/pvr_governor: add sysfs entry to switch governor type"

This reverts commit e441cc78ccd99f23a7e4a0495264b535e5b77779.
Revert "drivers/gpu/pvr/pvr_governor: add a simple PVR GPU governor"

This reverts commit 7de6dc5646723d4e71b94fc9076215844ce39ac6.
OMAP2+: DVFS: optimize DVFS scale

Currently, the s/w model assumes that when _dvfs_scale is called
we definitely need to do a scale. However when IVA/MPU scales, due to
dependency, _dvfs_scale is invoked for core domain. This unfortunately
does result in SR being disabled, re-enabled, an attempt of voltagescale
and a scan of frequency changes to take place, when there is NO need
for any of these to take place.

we can optimize by doing a pre-scan of the data structures prior to
doing the timeconsuming transition operations

Change-Id: I76e1989acc077092bd7af3027c6fe05adaaffca1
Signed-off-by: Nishanth Menon <nm@ti.com>
freezer: shorten freezer sleep time using exponential backoff

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>
Signed-off-by: Dan Trifan <jimsth@gmail.com>
power: decrease the amount of time the device waits after entering lower power state - Thanks Franco

Signed-off-by: Dan Trifan <jimsth@gmail.com>
Power: add an API to log wakeup reasons

Add API log_wakeup_reason() and expose it to userspace via sysfs path
/sys/kernel/wakeup_reasons/last_resume_reason

Change-Id: I81addaf420f1338255c5d0638b0d244a99d777d1
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
POWER: fix compile warnings in log_wakeup_reason

Change I81addaf420f1338255c5d0638b0d244a99d777d1 introduced compile
warnings, fix these.

Change-Id: I05482a5335599ab96c0a088a7d175c8d4cf1cf69
Signed-off-by: Ruchi Kandoi <kandoiruchi@google.com>
ext4: Speed up FITRIM by recording flags in ext4_group_info

In ext4, when FITRIM is called every time, we iterate all the
groups and do trim one by one. It is a bit time wasting if the
group has been trimmed and there is no change since the last
trim.

So this patch adds a new flag in ext4_group_info->bb_state to
indicate that the group has been trimmed, and it will be cleared
if some blocks is freed(in release_blocks_on_commit). Another
trim_minlen is added in ext4_sb_info to record the last minlen
we use to trim the volume, so that if the caller provide a small
one, we will go on the trim regardless of the bb_state.

A simple test with my intel x25m ssd:
df -h shows:
/dev/sdb1              40G   21G   17G  56% /mnt/ext4
Block size:               4096

run the FITRIM with the following parameter:
range.start = 0;
range.len = UINT64_MAX;
range.minlen = 1048576;

without the patch:
[root@boyu-tm linux-2.6]# time ./ftrim /mnt/ext4/a
real	0m5.505s
user	0m0.000s
sys	0m1.224s
[root@boyu-tm linux-2.6]# time ./ftrim /mnt/ext4/a
real	0m5.359s
user	0m0.000s
sys	0m1.178s
[root@boyu-tm linux-2.6]# time ./ftrim /mnt/ext4/a
real	0m5.228s
user	0m0.000s
sys	0m1.151s

with the patch:
[root@boyu-tm linux-2.6]# time ./ftrim /mnt/ext4/a
real	0m5.625s
user	0m0.000s
sys	0m1.269s
[root@boyu-tm linux-2.6]# time ./ftrim /mnt/ext4/a
real	0m0.002s
user	0m0.000s
sys	0m0.001s
[root@boyu-tm linux-2.6]# time ./ftrim /mnt/ext4/a
real	0m0.002s
user	0m0.000s
sys	0m0.001s

A big improvement for the 2nd and 3rd run.

Even after I delete some big image files, it is still much
faster than iterating the whole disk.

[root@boyu-tm test]# time ./ftrim /mnt/ext4/a
real	0m1.217s
user	0m0.000s
sys	0m0.196s

Cc: Lukas Czerner <lczerner@redhat.com>
Reviewed-by: Andreas Dilger <adilger.kernel@dilger.ca>
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>

Conflicts:
	fs/ext4/mballoc.c
Added sysfs option to set screen_on_min_freq
With this option, the certain lack of smoothness can be counteracted when scaling_min_freq is set very low (e.g. to 192 MHz). Thanks to this option, battery savings granted by the low scaling_min_freq can be achieved, without any negative effects to the user.
The sysfs path is located at: /sys/devices/system/cpu/cpu0/cpufreq/screen_on_min_freq

Conflicts:
	arch/arm/mach-omap2/omap2plus-cpufreq.c
arch: omap: add userspace export of the current GPU clock. Works mostly like scaling_cur_freq.
Source: https://github.com/franciscofranco/Tuna_JB_pre1/commit/a9c8946aef889caaed0f37c8caf475ccdece78f5

Conflicts:
	arch/arm/mach-omap2/omap2plus-cpufreq.c
CPU transition latency: 30000; also optimized screen_on_min_freq behavior
omap2plus-cpufreq.c: make screen_on_min_freq, screen_off_max_freq and max_capped accessible from cpufreq.h
lib/lzo: huge LZO decompression speedup on ARM by using unaligned access

Signed-off-by: Markus F.X.J. Oberhumer <markus@oberhumer.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.

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>
ARM: 7173/1: Add optimised swahb32() byteswap helper for v6 and above

ARMv6 and later processors have the REV16 instruction, which swaps
the bytes within each halfword of a register value.

This is already used to implement swab16(), but since the native
operation performaed by REV16 is actually swahb32(), this patch
renames the existing swab16() helper accordingly and defines
__arch_swab16() in terms of it.  This allows calls to both swab16()
and swahb32() to be optimised.

The compiler's generated code might improve someday, but as of
4.5.2 the code generated for pure C implementing these 16-bit
bytesswaps remains pessimal.

swahb32() is useful for converting 32-bit Thumb instructions
between integer and memory representation on BE8 platforms (among
other uses).

Signed-off-by: Dave Martin <dave.martin@linaro.org>
Reviewed-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>