DRIVERS: SLIMBUS: some more tweaks, which is double what we had before. According to some documents this is what we want for optimium audio quality

ZeroInfinity/Poondog

Signed-off-by: ZeroInfinity <infinitezero345@gmail.com>
Signed-off-by: poondog <markj338@gmail.com>
Signed-off-by: flar2 <asegaert@gmail.com>
GPU: start at 200MHz instead of 320MHz

Signed-off-by: flar2 <asegaert@gmail.com>
FINAL fixes to get stable kernel

Conflicts:
	arch/arm/configs/g3-vzw-perf_defconfig
	drivers/power/bq24296_charger.c
	drivers/switch/hds_max14688.c
	drivers/usb/dwc3/dwc3-msm.c
media-device: fix infoleak in ioctl media_enum_entities()
scripts: remove localversion "+" from kernel version strings

Signed-off-by: faux123 <reioux@gmail.com>
readahead: make context readahead more conservative

This helps performance on moderately dense random reads on SSD.

Transaction-Per-Second numbers provided by Taobao:

		QPS	case
		-------------------------------------------------------
		7536	disable context readahead totally
w/ patch:	7129	slower size rampup and start RA on the 3rd read
		6717	slower size rampup
w/o patch:	5581	unmodified context readahead

Before, readahead will be started whenever reading page N+1 when it happen
to read N recently.  After patch, we'll only start readahead when *three*
random reads happen to access pages N, N+1, N+2.  The probability of this
happening is extremely low for pure random reads, unless they are very
dense, which actually deserves some readahead.

Also start with a smaller readahead window.  The impact to interleaved
sequential reads should be small, because for a long run stream, the the
small readahead window rampup phase is negletable.

The context readahead actually benefits clustered random reads on HDD
whose seek cost is pretty high.  However as SSD is increasingly used for
random read workloads it's better for the context readahead to concentrate
on interleaved sequential reads.

Another SSD rand read test from Miao

        # file size:        2GB
        # read IO amount: 625MB
        sysbench --test=fileio          \
                --max-requests=10000    \
                --num-threads=1         \
                --file-num=1            \
                --file-block-size=64K   \
                --file-test-mode=rndrd  \
                --file-fsync-freq=0     \
                --file-fsync-end=off    run

shows the performance of btrfs grows up from 69MB/s to 121MB/s, ext4 from
104MB/s to 121MB/s.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Tested-by: Tao Ma <tm@tao.ma>
Tested-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: flar2 <asegaert@gmail.com>

Conflicts:
	mm/readahead.c

Conflicts:
	mm/readahead.c

Conflicts:
	mm/readahead.c
msm: Fix high load average from uninterruptible waits

 * The load average on all MSMs is currently hovering at around 14
   due to uninterruptible waits in various places.
 * Convert these waits to interruptible waits to bring the load
   back down to zero at idle.

Change-Id: I14bad4af135b1594e235e2252cb484cb34d91054

Signed-off-by: flar2 <asegaert@gmail.com>
Add /dev/frandom support

Signed-off-by: flar2 <asegaert@gmail.com>
Add schedulers and governors
Voltage Control: generic voltage control for DTS based kernels

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:
	arch/arm/mach-msm/clock-krait-8974.c
	drivers/cpufreq/cpufreq.c

Conflicts:
	arch/arm/mach-msm/Kconfig
Revert governors, fixup schedulers

Conflicts:
	include/linux/cpufreq.h
msm8974: Adapt memutils optimizations from msm8960pro

Preload farther to take advantage of the memory bus, and assume
64-byte cache lines.  Unroll some pairs of ldm/stm as well, for
unexplainable reasons.

Future enhancements should include,

- #define for how far to preload, possibly defined separately for
  memcpy, copy_*_user
- Tuning for misaligned buffers
- Tuning for memmove
- Tuning for small buffers
- Understanding mechanism behind ldm/stm unroll causing some gains
  in copy_to_user

BASELINE (msm8960pro):
======================================================================
memcpy 1000MB at 5MB       : took 808850 usec, bandwidth 1236.236 MB/s
copy_to_user 1000MB at 5MB : took 810071 usec, bandwidth 1234.234 MB/s
copy_from_user 1000MB at 5M: took 942926 usec, bandwidth 1060.060 MB/s
memmove 1000GB at 5MB      : took 848588 usec, bandwidth 1178.178 MB/s
copy_to_user 1000GB at 4kB : took 847916 usec, bandwidth 1179.179 MB/s
copy_from_user 1000GB at 4k: took 935113 usec, bandwidth 1069.069 MB/s
copy_page 1000GB at 4kB    : took 779459 usec, bandwidth 1282.282 MB/s

THIS PATCH:
======================================================================
memcpy 1000MB at 5MB       : took 346223 usec, bandwidth 2888.888 MB/s
copy_to_user 1000MB at 5MB : took 348084 usec, bandwidth 2872.872 MB/s
copy_from_user 1000MB at 5M: took 348176 usec, bandwidth 2872.872 MB/s
memmove 1000GB at 5MB      : took 348267 usec, bandwidth 2871.871 MB/s
copy_to_user 1000GB at 4kB : took 377018 usec, bandwidth 2652.652 MB/s
copy_from_user 1000GB at 4k: took 371829 usec, bandwidth 2689.689 MB/s
copy_page 1000GB at 4kB    : took 383763 usec, bandwidth 2605.605 MB/s

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Signed-off-by: franciscofranco <franciscofranco.1990@gmail.com>
msm8974: Adapt memutils optimizations from msm8960pro (part 2)

Conflicts:
	arch/arm/mach-msm/Kconfig
	arch/arm/mach-msm/Makefile

Conflicts:
	arch/arm/mach-msm/Makefile
Enable bfq Scheduler
Update Defconfig for new features

Conflicts:
	arch/arm/configs/g3-vzw-perf_defconfig
Fixup mkscript
Oversharpening fix

Conflicts:
	arch/arm/boot/dts/msm8974pro-g3-kr/msm8974pro-g3-kr-panel.dtsi
	arch/arm/boot/dts/msm8974pro-g3-tmo_us/msm8974pro-g3-tmo_us-panel.dtsi
	arch/arm/boot/dts/msm8974pro-g3-vzw/msm8974pro-g3-vzw-panel.dtsi
Fix -Warray-bounds warnings

Conflicts:
	net/ipv4/tcp_input.c
	sound/soc/msm/qdsp6v2/rtac.c

Conflicts:
	net/ipv4/tcp_input.c
	sound/soc/msm/qdsp6v2/rtac.c
kernel: quick fix
net/ipv4|include/asm-generic: Enhancement of out of bounds fix