block : Zen I/O scheduler

Q: What is the zen I/O scheduler?
A: Well, the question that was asked above led me to an analysis of V(R ), deadline, and some others. I already knew, but realized "this is the main feature of V(R), but wait it has no benefit to us smartphone users." So I thought about adjusting the way V(R ) handled requests and how it dispatched them (I chose V(R ) because i'd rather not tinker with a scheduler thats official and widely supported). Then I was looking over it, and realized I might as well just write a new one I don't need any of this stuff. So I came up with something awfully similar to SIO, although its a bit simpler than SIO (closer to no-op) and works just slightly different.
- It's an FCFS (First come, first serve) based algorithm. It's not strictly FIFO. It does not do any sorting. It uses deadlines for fairness, and treats synchronous requests with priority over asynchronous ones. Other than that, pretty much the same as no-op.
staging: android: lowmemorykiller: Add config option to support oom_adj values (yank)
cypress: keep compatible with newer CM10.2 as well as older CM10.2 ROMs (Yank555.lu)

- include new CM philosophy of handling h/w keys backlight from the ROM (Yank555.lu)
- kept the old sysfs interface and handling for older ROMs (Yank555.lu)
- kept the sysfs interface to enable/disable lighting hardwarekey backlight on screen touch (Yank555.lu)

SysFS interface :

 * /sys/class/sec/sec_touchkey/touch_led_handling (rw)
 *
 *   0 - handled by ROM (newer CM10.2, default)
 *   1 - handled by kernel (older CM10.2)
 *
 * /sys/class/sec/sec_touchkey/touch_led_on_screen_touch (rw)
 *
 *   0 - hardware keys backlight only lights up if h/w keys are used
 *   1 - hardware keys backlight lights up if h/w keys are used or screen is touched (default)

cypress: report led status via sysfs

Change-Id: Iddecb0688e758eca3ba77b520510a6728ad1e3bb

cypress-touchkey: remove backlight timeout feature

Userspace implementation:
http://review.cyanogenmod.org/48796
http://review.cyanogenmod.org/48872
http://review.cyanogenmod.org/48884

Change-Id: Id4ac50168220310e82aa4aae367dad4e72e3a9c3
cypress: keep compatible with newer CM10.2 as well as older CM10.2 ROMs (Yank555.lu)

- default to kernel rather than ROM handling
[PATCH] cypress: keep compatible with newer CM10.2 as well as older
 CM10.2 ROMs (Yank555.lu)

- include new CM philosophy of handling h/w keys backlight from the ROM (Yank555.lu)
- kept the old sysfs interface and handling for older ROMs (Yank555.lu)
- kept the sysfs interface to enable/disable lighting hardwarekey backlight on screen touch (Yank555.lu)

SysFS interface :

 * /sys/class/sec/sec_touchkey/touch_led_handling (rw)
 *
 *   0 - handled by ROM (newer CM10.2, default)
 *   1 - handled by kernel (older CM10.2)
 *   2 - handled by kernel plus ROM side input ignored (older CM10.2)
 *
 * /sys/class/sec/sec_touchkey/touch_led_on_screen_touch (rw)
 *
 *   0 - hardware keys backlight only lights up if h/w keys are used
 *   1 - hardware keys backlight lights up if h/w keys are used or screen is touched (default)
smdk4412: frandom (integrated into zImage)
drivers/char: tweak random
cpu boost: backport missing functions from 3.4 (DerTeufel)
reference: http://webcache.googleusercontent.com/search?q=cache:7y4Vnjzxo6wJ:androidfilesgit.org/MaC/android_kernel_jewel/commit/8e9f9bdc0bb75222891cb39389fef6910dcb085d.diff+&cd=1&hl=en&ct=clnk&gl=il

thx to dorimanx for commiting cpu boost to his 3.12 kernel. i would have missed this driver without him

Change-Id: I3cd786129f7eff14bb775194919c803566e07f25 (reverted from commit 1be7bb8d895ae518fd9459614ec7848802278ddd)
rwsem: R/W semaphores implemented using ARM atomic functions
writeback: fix occasional slow sync(1)
In case when system contains no dirty pages, wakeup_flusher_threads() will
submit WB_SYNC_NONE writeback for 0 pages so wb_writeback() exits
immediately without doing anything, even though there are dirty inodes in
the system.  Thus sync(1) will write all the dirty inodes from a
WB_SYNC_ALL writeback pass which is slow.

Fix the problem by using get_nr_dirty_pages() in wakeup_flusher_threads()
instead of calculating number of dirty pages manually.  That function also
takes number of dirty inodes into account.

Change-Id: Ic90f80a31bb866b7628143b8b013871f83d05c13
Signed-off-by: Jan Kara <jack@suse.cz>
Reported-by: Paul Taysom <taysom@chromium.org>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
samsung-battery: Reduce battery-monitor wakelock timeouts

Idea by AndreiLux
Update defconfig
cpufreq: experimental 2000MHz support

Added 2 additional frequencies since testing has shown 1800MHz to be stable enough for daily use. We are simply pushing the limit to what we know can still work for some CPU's. Not all CPU's are created equal so this won't work for everyone.

Signed-off-by: sarcastillo <sar.castillo@gmail.com>

Conflicts:
	include/linux/cpufreq.h

Change-Id: I64701ac9517a55ee70d45e8d04c31342c7d33144

Conflicts:
	include/linux/cpufreq.h
cifs: enable mounting cifs drives visible to all apps (tomkasick)

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.

*** Do not commit to CyanogenMod Project kernels, as a similar workaround
for this problem is patched in Zygote/Dalvik/libdvm instead. ***
Arch arm : Correctly handle unaligned access + arch_extension sec + cpu_alignment
build_env: block unaligned-access code generation
mmc: disable crc for better performance
ARM: Add optimised swahb32() byteswap helper
ARM-spinlock: use ticket algorithm for ARMv6+ locking implementation
ARM: L1 cache optimization