ARM: mm: avoid flushing exec anonymous pages with non-aliasing caches

Given that userspace can't rely on the kernel to flush pages that are
mapped as executable after having been written to by the user, we can
avoid flushing anonymous executable pages when we don't have an aliasing
data cache.

This patch skips the cache maintenance in __sync_icache_dcache for this
scenario, bringing us in-line with the arm64 implementation.

Cc: Albin Tonnerre <albin.tonnerre@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
bye uksm
mm: pksm: Import AnonPage-KSM v0.2

PKSM v0.2 by Figo.zhang with some minor changes for linux-3.4.104

Change-Id: I9c442b807c9017f979f894319511a90ac0964d14
Signed-off-by: Luis Cruz <ljc2491@gmail.com>

Conflicts:
	include/linux/page-flags.h
	mm/vmstat.c
mm: pksm: Provide support to use deferred timers for scanner thread

Based on CodeAurora's dd4c913102343a7aa8940a422ab2eacc58ada928, allowing
pksm to use deferred timers in the same manner as ksm.

Change-Id: Iecfe35eafbc957f8abde6fd69a3abd72b363d6a2
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
mm: pksm: Split common ksm sysfs from pksm (for CM init)

CyanogenMod modifies ksm on init, so keep the common ksm sysfs files
in their original place.

Change-Id: I43bc7028092953ead37077931ab95270630dbe8c
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
mm: pksm: Clean up warnings

Skimp out on some unused functions.

Also fix:
mm/pksm.c: In function 'is_full_zero':
mm/pksm.c:156:23: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]

Change-Id: I65cf0de70aaf0708cc57e278682358cad6f5fed8
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
mm: pksm: Optimize is_full_zero for ARM

Include a slightly more optimized is_full_zero, using bits from
ARM's memcmp.

Change-Id: I1403bdd13639f66284dc9a08e56a811031cd1b15
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
mm: pksm: Attempt to fix null pointer dereference

Remove unneeded initializations & structure alloc_stable_anon to be
more like its non-anon counterpart in ksm.

(2 days of testing show no null pointer dereferencing)

Change-Id: Ica923048f7eb9127621b59e0b0e0d8135cd87cb9
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
mm: pksm: Use hash_cmp for x86 only

Change-Id: I122aaa39e70b39c04bcd6d15f1aa82f31eda45dd
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
mm: pksm: Separate pksm tuning sysfs

Allow for stock pksm values on init.
CM's tunings for ksm were sub-optimal for pksm; which
works differently.

Change-Id: Ie3688f302119630adea8cfbc86a177411c034c61
defconfig