Enable RTC write

Change-Id: I462458c9147ec663115b807fa4df979977796b2d
M2: otg: fix runaway wakelock

When booting with wall-charger plugged-in state machine transitions to
STATE_B_PERIPHERAL (B_SESS_VLD bit is set in msm_otg_init_sm).

Aftr uplugging, bit is not cleared, and state machine never transitions
to IDLE, consequently msm_otg wakelock is never unlocked.
Merge "Enable RTC write" into cm-10.1
Merge "M2: otg: fix runaway wakelock" into cm-10.1
Revert "Make using open-source drivers such as Freedreno possible."

 * Holy brainmelt Batman!  I've been trying to determine what is causing
   the constant crashes for days.  It's this.  The reason is that
   enabling KGSL_DRM disables KGSL_PER_PROCESS_PAGE_TABLE! This
   configuration will cause the address space to be quickly exhausted in
   a spectacular way.

 * Please do not turn this back on unless you want to pay my
   psychiatrist bill!

This reverts commit 7a938217abd8b12e70c30bf00400fbb59dcd92a6.
CHROMIUM: UPSTREAM: staging: zsmalloc: remove x86 dependency

This patch replaces the page table assisted object mapping
method, which has x86 dependencies, with a arch-independent
method that does a simple copy into a temporary per-cpu
buffer.

While a copy seems like it would be worse than mapping the pages,
tests demonstrate the copying is always faster and, in the case of
running inside a KVM guest, roughly 4x faster.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

BUG=chromium-os:36829
TEST=extensive manual testing

Change-Id: I8b41c92eb146c5cf0af40682802ba443f7810a0b
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38999
Reviewed-by: Olof Johansson <olofj@chromium.org>
CHROMIUM: UPSTREAM: staging: zram/zcache: swtich Kconfig dependency from X86 to ZSMALLOC

upstream: commit 6e2361720b9da9ec830d407da058ca1827e62b12

This patch switches zcache and zram dependency to ZSMALLOC
rather than X86.  There is no net change since ZSMALLOC
depends on X86, however, this prevent further changes to
these files as zsmalloc dependencies change.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

BUG=chromium-os:36829
TEST=compile, verify that zram module is updated and /boot/config is correct

Change-Id: I91f6ed46549fe62a9fe3035063d98beb2f5d966a
Signed-off-by: Luigi Semenzato <semenzato@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/39289
Tested-by: Luigi Semenzato <semenzato@google.com>
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Commit-Ready: Luigi Semenzato <semenzato@google.com>
d2: Update defconfigs

 * Enable ZCACHE and ZRAM now that ZSMALLOC works on ARM again.

Change-Id: I40f5c6ceef700020313b4d23432c638d1ec1c237
cpufreq: interactive: base above_hispeed_delay on target freq, not current

Time to wait should be based on the intended target speed, not the
actual speed (which may be held high by another CPU).

Change-Id: Ifc5bb55d06adddb9a02af90af05398a78f282272
Reported-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Merge remote-tracking branch 'CM/cm-10.1' into cm-10.1