Linux 3.4.80

Change-Id: I60c3aecae9fcc70e6abb1554ea58bfd2ee81f24b
Signed-off-by: LaboDJ <jacopolabardi@gmail.com>
defconfig: reduce debugging and active recently added features

Change-Id: I1838bc908dd7cb162e6209547031f0fca17ee896
Asynchronous Fsync: initial extraction of Async Fsync from HTC

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:

	drivers/mmc/core/mmc.c
	fs/Kconfig

Change-Id: Ib5665a04b23558f234bc006d82044254f60df9eb
fs/Kconfig: fix warning related to AYSNC_FSYNC patch

Change-Id: I9eae2c2ad9e1019657a6327364a82bf52e2ea158
Signed-off-by: Paul Reioux <reioux@gmail.com>
defconfig: enable ASYNC_FSYNC

Change-Id: I5962580e1107b5700d5e2d9d9e0da5ba3852ef59
zswap, frontswap, vnswap: extract and backport to Nexus series

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:

	include/linux/swap.h
	include/trace/events/vmscan.h
	mm/Makefile
	mm/internal.h
	mm/page_io.c
	mm/shmem.c
	mm/swapfile.c
	mm/vmscan.c

Change-Id: I69d588b9d0a21cf767ee4422013a82164c6f0a0e
decompressor: Add LZ4 decompressor module

Date	Tue, 26 Feb 2013 15:24:27 +0900

This patch adds support for LZ4 decompression in the Linux Kernel.
LZ4 Decompression APIs for kernel are based on LZ4 implementation
by Yann Collet.

LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
LZ4 source repository : http://code.google.com/p/lz4/

Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com>

v2:
- Clean up code
- Enable unaligned access for ARM v6 and above with
  CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
- Add lz4_decompress() for faster decompression with
  uncompressed output size

Change-Id: Idf2fcf267c6e9b49aefdf35baccfe6030e396230
Signed-off-by: Paul Reioux <reioux@gmail.com>
lib: Add support for LZ4-compressed kernel

Date	Tue, 26 Feb 2013 15:24:28 +0900

This patch adds support for extracting LZ4-compressed kernel images,
as well as LZ4-compressed ramdisk images in the kernel boot process.

This depends on the patch below
decompressor: Add LZ4 decompressor module

Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com>

v2:
- Clean up code
- Use lz4_decompress() for LZ4-compressed kernel during boot-process

Change-Id: Ibeee53cc9c58e6a96d0a0413f72df988da9ade6e
Signed-off-by: Paul Reioux <reioux@gmail.com>
arm: Add support for LZ4-compressed kernel

Date	Tue, 26 Feb 2013 15:24:29 +0900

This patch integrates the LZ4 decompression code to the arm pre-boot code.
And it depends on two patchs below

lib: Add support for LZ4-compressed kernel
decompressor: Add LZ4 decompressor module

Signed-off-by: Kyungsik Lee <kyungsik.lee@lge.com>

v2:
- Apply CFLAGS, -Os to decompress.o to improve decompress
  performance during boot-up process

Change-Id: I9a6eea827b5ab3b4c3327c20a7f4bed70aefcf9a
Signed-off-by: Paul Reioux <reioux@gmail.com>
lib: Add lz4 compressor module

From	Chanho Min <>

This patch adds support for LZ4 compression in the Linux Kernel.
LZ4 Compression APIs for kernel are based on LZ4 implementation
by Yann Collet and changed with kernel coding style.

LZ4 homepage : http://fastcompression.blogspot.com/p/lz4.html
LZ4 source repository : http://code.google.com/p/lz4/
svn revision : r90

Two APIs are added:
lz4_compress() support basic lz4 compression whereas lz4hc_compress() support
high compression or CPU performance get lower but compression ratio get higher.
Also, we require the pre-allocated working memory with the defined size and
destination buffer must be allocated with the size of lz4_compressbound.

Signed-off-by: Chanho Min <chanho.min@lge.com>

Change-Id: I992f31db940142a62df31073216581a3a977f3e3
Signed-off-by: Paul Reioux <reioux@gmail.com>
crypto: Add lz4 Cryptographic API

From	Chanho Min <>

This patch adds support for lz4 and lz4hc compression algorithm
using the lib/lz4/* codebase.
Signed-off-by: Chanho Min <chanho.min@lge.com>

Change-Id: I137711132da82efadbb74a325c940f506e309c6f
Signed-off-by: Paul Reioux <reioux@gmail.com>
lib/lz4/lz4_compress: fix macro usage error

Change-Id: I2d8b1f543de6046e730c8f658c78346297fcfd3b
Signed-off-by: Paul Reioux <reioux@gmail.com>
LZ4: compression/decompression signedness mismatch (v2)

LZ4 compression and decompression functions require different
in signedness input/output parameters: unsigned char for
compression and signed char for decompression.

Change decompression API to require "(const) unsigned char *".

v2: minor coding style fix.

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

Change-Id: I7b3c12fae641635dd592c18044d77f2a988445d8
Signed-off-by: Paul Reioux <reioux@gmail.com>
mm/page_io.c: remove printk warning when used with zswap

Signed-off-by: Paul Reioux <reioux@gmail.com>

Conflicts:

	mm/page_io.c

Change-Id: I9b49a9428e1a533a1c03056724b1c255ededa2ce
mm/Kconfig: add ZSWAP writeback options

Change-Id: I29e6d2bc21898d2c7a5e3afad1136caa2b144abd
Signed-off-by: Paul Reioux <reioux@gmail.com>
mm/swap: fix race on swap_info reuse between swapoff and swapon

Date	Thu, 09 Jan 2014 13:39:55 +0800

swapoff clear swap_info's SWP_USED flag prematurely and free its resources
after that. A concurrent swapon will reuse this swap_info while its previous
resources are not cleared completely.

These late freed resources are:
- p->percpu_cluster
- swap_cgroup_ctrl[type]
- block_device setting
- inode->i_flags &= ~S_SWAPFILE

This patch clear SWP_USED flag after all its resources freed, so that swapon
can reuse this swap_info by alloc_swap_info() safely.

Change-Id: If6823b5fda19ba2ebb5575709e6062c5ad2b98ff
Signed-off-by: Weijie Yang <weijie.yang@samsung.com>
Signed-off-by: Paul Reioux <reioux@gmail.com>
ARM: move VFP init to an earlier boot stage

In order to use the NEON unit in the kernel, we should
initialize it a bit earlier in the boot process so NEON users
that like to do a quick benchmark at load time (like the
xor_blocks or RAID-6 code) find the NEON/VFP unit already
enabled.

Replaced late_initcall() with core_initcall().

Signed-off-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
Acked-by: Nicolas Pitre <nico at linaro.org>

Change-Id: Idfdc51067c5dee94636fa761e807f72d4e9277f4
Signed-off-by: Paul Reioux <reioux@gmail.com>
regulator: core: Use the power efficient workqueue for delayed powerdown

Adapted for 3.4 from lsk-v3.10

There is no need to use a normal per-CPU workqueue for delayed power downs
as they're not timing or performance critical and waking up a core for them
would defeat some of the point.

Signed-off-by: Mark Brown <broonie@linaro.org>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Liam Girdwood <liam.r.girdwood@intel.com>
(cherry picked from commit 070260f07c7daec311f2466eb9d1df475d5a46f8)
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
Signed-off-by: poondog <markj338@gmail.com>

Change-Id: I89069b83f6fb49382dbe0abeae0ed2a25d6ee1c0
workqueues: Introduce new flag WQ_POWER_EFFICIENT for power oriented workqueues

Adapted for 3.4 from lsk-v3.10

Workqueues can be performance or power-oriented. Currently, most workqueues are
bound to the CPU they were created on. This gives good performance (due to cache
effects) at the cost of potentially waking up otherwise idle cores (Idle from
scheduler's perspective. Which may or may not be physically idle) just to
process some work. To save power, we can allow the work to be rescheduled on a
core that is already awake.

Workqueues created with the WQ_UNBOUND flag will allow some power savings.
However, we don't change the default behaviour of the system.  To enable
power-saving behaviour, a new config option CONFIG_WQ_POWER_EFFICIENT needs to
be turned on. This option can also be overridden by the
workqueue.power_efficient boot parameter.

tj: Updated config description and comments.  Renamed
    CONFIG_WQ_POWER_EFFICIENT to CONFIG_WQ_POWER_EFFICIENT_DEFAULT.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
(cherry picked from commit cee22a15052faa817e3ec8985a28154d3fabc7aa)
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Luis Cruz <ljc2491@gmail.com>
Signed-off-by: poondog <markj338@gmail.com>

Change-Id: I30a41d04c69badc2ca2fa4dff98ddf88a2be36fd
Buggy

Change-Id: Ia4ddad68f82d13e3dd94b9d1cc49f5b10fe071b4