add 2mb RAM back to ion for google camera to function
mm, oom: base root bonus on current usage

A 3% of system memory bonus is sometimes too excessive in comparison to
other processes.

With commit a63d83f427fb ("oom: badness heuristic rewrite"), the OOM
killer tries to avoid killing privileged tasks by subtracting 3% of
overall memory (system or cgroup) from their per-task consumption.  But
as a result, all root tasks that consume less than 3% of overall memory
are considered equal, and so it only takes 33+ privileged tasks pushing
the system out of memory for the OOM killer to do something stupid and
kill dhclient or other root-owned processes.  For example, on a 32G
machine it can't tell the difference between the 1M agetty and the 10G
fork bomb member.

The changelog describes this 3% boost as the equivalent to the global
overcommit limit being 3% higher for privileged tasks, but this is not
the same as discounting 3% of overall memory from _every privileged task
individually_ during OOM selection.

Replace the 3% of system memory bonus with a 3% of current memory usage
bonus.

By giving root tasks a bonus that is proportional to their actual size,
they remain comparable even when relatively small.  In the example
above, the OOM killer will discount the 1M agetty's 256 badness points
down to 179, and the 10G fork bomb's 262144 points down to 183500 points
and make the right choice, instead of discounting both to 0 and killing
agetty because it's first in the task list.

Signed-off-by: David Rientjes <rientjes@google.com>
Reported-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

Conflicts:
	mm/oom_kill.c
mm: don't lose the SOFT_DIRTY flag on mprotect

The SOFT_DIRTY bit shows that the content of memory was changed after a
defined point in the past.  mprotect() doesn't change the content of
memory, so it must not change the SOFT_DIRTY bit.

This bug causes a malfunction: on the first iteration all pages are
dumped.  On other iterations only pages with the SOFT_DIRTY bit are
dumped.  So if the SOFT_DIRTY bit is cleared from a page by mistake, the
page is not dumped and its content will be restored incorrectly.

This patch does nothing with _PAGE_SWP_SOFT_DIRTY, becase pte_modify()
is called only for present pages.

Fixes commit 0f8975ec4db2 ("mm: soft-dirty bits for user memory changes
tracking").

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Pavel Emelyanov <xemul@parallels.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
SDIO: Limit speed to the configured value

When reading the supported speed from the card, do not use a value
higher than indicated with the board data.  This is necessary with
the WL1271 TiWi module on the SDIO bus.  Emperically, it is found to
fail when run at the 25MHz it says it supports.

Signed-off-by: Steve Schefter <steve@scheftech.com>
OMAP4: USBTLL: Off mode disconnect workaround (Errata i754)

When resuming from OFF mode, the EHCI controller was performing a reset resume for ports using the TLL interface because the port status was being cleared. This was caused by the host controller not restoring the state of the ID pin in the TLL module correctly. This issue is workarounded by enabling the ID pin pull-up in the TLL (because the EHCI controller is always the host) and disabling ID pin events as these are not required for the TLL connection.

Change-Id: Ibc22d77606e05e4dd138819079028ebcf254039e Signed-off-by: Jon Hunter <jon-hunter@ti.com> Signed-off-by: Ruslan Bilovol <ruslan.bilovol@ti.com>
Revert "Revert " ARM: OMAP2+: PRCM: Clear reset sources after boot""

This reverts commit 69d436a27278630b30c849bb29f60b56b9525445.
Revert "Revert "ARM: smp: Save CPU registers before IPI_CPU_STOP processing (faux123)""

This reverts commit 2d57396d620d93c113ba4a71773378685da06d80.
Revert "mach-omap2 : opp4xxx_data.c : adjust mpu, core & iva voltages to stock levels"

This reverts commit 33cd5353929f4ca134fb61cd917cc277cacbd61e.
SmittyV
DirtyV
DirtyV-SR
Merge https://github.com/bsmitty83/DirtyV_tuna into DirtyV-f2fs