ARM: 7743/1: compressed/head.S: work around new binutils warning

commit da94a829305f1c217cfdf6771cb1faca0917e3b9 upstream.

In August 2012, Matthew Gretton-Dann checked a change into binutils
labelled "Error on obsolete & warn on deprecated registers", apparently as
part of ARMv8 support. Apparently, this was supposed to emit the message
"Warning: This coprocessor register access is deprecated in ARMv8" when
using certain mcr/mrc instructions and building for ARMv8. Unfortunately,
the message that is actually emitted appears to be '(null)', which is
less helpful in comparison.

Even more unfortunately, this is biting us on every single kernel
build with a new gas, because arch/arm/boot/compressed/head.S and some
other files in that directory are built with -march=all since kernel
commit 80cec14a8 "[ARM] Add -march=all to assembly file build in
arch/arm/boot/compressed" back in v2.6.28.

This patch reverts Russell's nice solution and instead marks the head.S
file to be built for armv7-a, which fortunately lets us build all
instructions in that file without warnings even on the broken binutils.

Without this patch, building anything results in:

arch/arm/boot/compressed/head.S: Assembler messages:
arch/arm/boot/compressed/head.S:565: Warning: (null)
arch/arm/boot/compressed/head.S:676: Warning: (null)
arch/arm/boot/compressed/head.S:698: Warning: (null)
arch/arm/boot/compressed/head.S:722: Warning: (null)
arch/arm/boot/compressed/head.S:726: Warning: (null)
arch/arm/boot/compressed/head.S:957: Warning: (null)
arch/arm/boot/compressed/head.S:996: Warning: (null)
arch/arm/boot/compressed/head.S:997: Warning: (null)
arch/arm/boot/compressed/head.S:1027: Warning: (null)
arch/arm/boot/compressed/head.S:1035: Warning: (null)
arch/arm/boot/compressed/head.S:1046: Warning: (null)
arch/arm/boot/compressed/head.S:1060: Warning: (null)
arch/arm/boot/compressed/head.S:1092: Warning: (null)
arch/arm/boot/compressed/head.S:1094: Warning: (null)
arch/arm/boot/compressed/head.S:1095: Warning: (null)
arch/arm/boot/compressed/head.S:1102: Warning: (null)
arch/arm/boot/compressed/head.S:1134: Warning: (null)

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: stable@vger.kernel.org
Cc: Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
[ccross: cherry-picked to 3.4]
Change-Id: If1c4c1a9f3f721a45d9833f2a36f1b7ce58c5e9a
Signed-off-by: Colin Cross <ccross@android.com>
memcg: add memory.pressure_level events

With this patch userland applications that want to maintain the
interactivity/memory allocation cost can use the pressure level
notifications.  The levels are defined like this:

The "low" level means that the system is reclaiming memory for new
allocations.  Monitoring this reclaiming activity might be useful for
maintaining cache level.  Upon notification, the program (typically
"Activity Manager") might analyze vmstat and act in advance (i.e.
prematurely shutdown unimportant services).

The "medium" level means that the system is experiencing medium memory
pressure, the system might be making swap, paging out active file
caches, etc.  Upon this event applications may decide to further analyze
vmstat/zoneinfo/memcg or internal memory usage statistics and free any
resources that can be easily reconstructed or re-read from a disk.

The "critical" level means that the system is actively thrashing, it is
about to out of memory (OOM) or even the in-kernel OOM killer is on its
way to trigger.  Applications should do whatever they can to help the
system.  It might be too late to consult with vmstat or any other
statistics, so it's advisable to take an immediate action.

The events are propagated upward until the event is handled, i.e.  the
events are not pass-through.  Here is what this means: for example you
have three cgroups: A->B->C.  Now you set up an event listener on
cgroups A, B and C, and suppose group C experiences some pressure.  In
this situation, only group C will receive the notification, i.e.  groups
A and B will not receive it.  This is done to avoid excessive
"broadcasting" of messages, which disturbs the system and which is
especially bad if we are low on memory or thrashing.  So, organize the
cgroups wisely, or propagate the events manually (or, ask us to
implement the pass-through events, explaining why would you need them.)

Performance wise, the memory pressure notifications feature itself is
lightweight and does not require much of bookkeeping, in contrast to the
rest of memcg features.  Unfortunately, as of current memcg
implementation, pages accounting is an inseparable part and cannot be
turned off.  The good news is that there are some efforts[1] to improve
the situation; plus, implementing the same, fully API-compatible[2]
interface for CONFIG_CGROUP_MEM_RES_CTLR=n case (e.g.  embedded) is also
a viable option, so it will not require any changes on the userland
side.

[1] http://permalink.gmane.org/gmane.linux.kernel.cgroups/6291
[2] http://lkml.org/lkml/2013/2/21/454

Change-Id: Ib7b9f7986008d423b84152e2781d0402a560c95e
[akpm@linux-foundation.org: coding-style fixes]
[akpm@linux-foundation.org: fix CONFIG_CGROPUPS=n warnings]
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kirill A. Shutemov <kirill@shutemov.name>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Luiz Capitulino <lcapitulino@redhat.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Leonid Moiseichuk <leonid.moiseichuk@nokia.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Input: Propagate hardware event timestamp to evdev.

Convey hardware timestamp associated with the current event packet.
The use of these event codes by hardware drivers is optional.
Used to reduce jitter and improve velocity tracking in ABS_MT devices.

Change-Id: I89f3a958944f6a2979964ee372e61bad448061b6
Signed-off-by: Sasha Levitskiy <sanek@google.com>
m2-gpiomux: Decrease leakage before QSC power-up

Taken from:
msm: mdm2: Decrease leakage before QSC power-up

Cleanup of IPC gpios for driver strength and toggle
AP2MDM_STATUS only after AP2MDM_KPD_PWR is toggled, this
will decrease the leakage from MSM to QSC before QSC
powering up.

CRs-Fixed: 460500
Signed-off-by: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Akhila Musunuri <makhila@codeaurora.org>

Change-Id: I4a84bbbbe2a63d91b4df74213110aebcf6902ae0
m2-gpiomux: set mdm pwr and reset gpios to pull down

Taken from:
msm: 8960: set mdm pwr and reset gpios to pull down

The suspend configurations of the KPD_PWR and RESET gpios used
to power on the external modem need to be changed to PULL_DOWN
from PULL_NONE to avoid spuriously powering on the modem early
in the boot process.

Change-Id: Ic907e7cc33b93571e6d5452e7dc048be7f34c9af
Signed-off-by: Joel King <joelking@codeaurora.org>
msm: Remove all references to CONFIG_ANDROID_PMEM

CONFIG_ANDROID_PMEM is completely deprecated. Remove all
references to it.

Change-Id: Ie1f2b08094fffdf308025d43bf4c8c164e52340b
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
video: msm: Increase video encoding output buffer size

When bistream buffer size is half of YUV buffer size, video core
may be put into a bad state where output buffers are not returned
back to user space. Increasing the output buffer size solves the issue.

Change-Id: Ie30ec084a764717526c74fc3f89d2684c7020f09
Signed-off-by: Shuzhen Wang <shuzhenw@codeaurora.org>
Soc: msm: Synchronize access to LPA stream

-Synchronize hw_ptr, appl_ptr access between the LPA
  driver and event handler and the ALSA core framework.

 -ported change from compressed driver
  change id I118bfdf4a866cde05d9ebcd21f756da209b69cc5

CRs-Fixed: 511481

Signed-off-by: Preetam Singh Ranawat <apranawat@codeaurora.org>
Change-Id: I0fe63d8fa4a5372b6c231a5ee44532140cce1301
sync: Fix a race condition between release_obj and print_obj

Before this change, a timeline would only be removed from the timeline
list *after* the sync driver had its release_obj() called. However, the
driver's release_obj() may free resources needed by print_obj().

Although the timeline list is locked when print_obj() is called, it is
not locked when release_obj() is called. If one CPU was in print_obj()
when another was in release_obj(), the print_obj() may make unsafe
accesses.

It is not actually necessary to hold the timeline list lock when calling
release_obj() if the call is made after the timeline is unlinked from
the list, since there is no possibility another thread could be in --
or enter -- print_obj() for that timeline.

This change moves the release_obj() call to after the timeline is
unlinked, preventing the above race from occurring.

Signed-off-by: Alistair Strachan <alistair.strachan@imgtec.com>
Change-Id: I42953704c7a32382fb8529304499088665dbbd33
fs: Add exFAT file system

Change-Id: I7b611a7290e13b382597b34e68f05c78e19c4895
d2: regenerate defconfig

PS 2: remove selinux config

PS 3: remove CONFIG_MSM_BAM_DMUX_NOLOCK for d2usc

Change-Id: I00399e3a54eac2dbfc7021810ad1ee36f1a2089a
d2: update defconfig

Change-Id: I622ad38a55d88175ae4bddfe681897f0590952c4
d2: Raise ION_MM_SIZE

From 96MB to 108MB

This was previously tried in CM10.1 but the size increase was to aggressive.
Still might not be the perfect size but does allow the ability to use
Instagram Video and not cause Youtube HD video playback issues.  I believe
something else needs to be tweaked for a complete fix, but this helps.

(continuation of http://review.cyanogenmod.org/#/c/45984/)

(https://github.com/CyanogenMod/android_kernel_samsung_d2/commit/23e378434c50583c83822eb0687c8d25be3cb435 for the idea)

	PS3: down to 104
	PS4: up to 108

Change-Id: I9facda8b4228e3d4f0981f2c682b4bd27e633645
Optimize