Squashed update of kernel from 3.4.77 to 3.4.78
Squashed update of kernel from 3.4.78 to 3.4.79
Squashed update of kernel from 3.4.79 to 3.4.80
Squashed update of kernel from 3.4.80 to 3.4.81
Squashed update of kernel from 3.4.81 to 3.4.82
Squashed update of kernel from 3.4.82 to 3.4.83
Squashed update of kernel from 3.4.83 to 3.4.84
Squashed update of kernel from 3.4.84 to 3.4.85
Squashed update of kernel from 3.4.85 to 3.4.86
Squashed update of kernel from 3.4.86 to 3.4.87
workqueue: Added null check and warning

If work item is already in queue get_work_cwq() will return null.
so null check is added to avoid crash in delayed_work_timer_on()

CRs-Fixed: 586162

Change-Id: I5c885142fd72781cea90d6c9b3456ecc7f0778b6
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
msm: msm_fb: Update panel info in case of resolution change.
In case of resolution change, panel_info and mfd are updated with latest resolution.

Change-Id: I4958b8adc1650ec01c331b1a1ab695c5fd5add9b
Signed-off-by: raghavendra ambadas <rambad@codeaurora.org>
Revert "mm: make is_vmalloc_addr work properly."

This reverts commit d560dd9a8fd200d119be3bb9d99f22b0f06eddb4

Change-Id: I610975d802b11c6c382c2c29f8e2394ce8acce2d
Signed-off-by: Shruthi Krishna <skrish@codeaurora.org>
mm: make is_vmalloc_addr lockless

is_vmalloc_addr currently takes the vmap_area_lock and walks
the list of vmalloc areas to determine if an address is actually
a vmalloc address. Unfortunately, the current locking structure
with vmap_area_lock does not disable irqs which means that it may
be possible to recusively take the vmap_area_lock if an irq occurs
while walking the tree list. Considering the list of possible
vmalloc vs. not vmalloc ranges is not going to change after bootup,
skip the tree walking and just keep a bitmap of which virtual
addresses are set aside for vmalloc and which are not.

Change-Id: I0c159e09dc17b5c6641d08dcf630e6116b991cd5
CRs-Fixed: 591797
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
android: lowmemorykiller: add lmk parameters tunning code.

There are cases that LMK doesn't run, even when it must run.
It is due to LMK shrinker not considering memory status per zone.
So add LMK parameters(other_free, other_file) tunnig code to
consider target zone of LMK shrinker.

Change-Id: I6f1f8660d5da920a0e3af45a160499965032081d
Git-commit: 22d990a58fc17b3f0155e15eb2dc3efa037bea1c
Git-repo: https://android.googlesource.com/kernel/common/
[ohaugan@codeaurora.org: Fix compilation issues]
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
android/lowmemorykiller: Account for total_swapcache_pages

The lowmemorykiller relies on NR_FILE_PAGES when measureing
the amount of reclaimable memory in the system.
However when swap is enabled swap cache pages are counted
in NR_FILE_PAGES, and swap cache pages aren't as reclaimable
in low memory as file cache pages. Therefore a large swap
cache can result in the lowmemorykiller not running and
an OOM occuring.

In order to ensure the lowmemorykiller properly evaluates the
amount of reclaimable memory don't count the swap cache pages.

Change-Id: I38239283e572f814b277c718eaf6be7f92abacbb
Signed-off-by: Liam Mark <lmark@codeaurora.org>
defconfig: Disable CONFIG_ENABLE_VMALLOC_SAVING

 * Only useful for devices with more than 1GB memory
Revert lowmem and vmalloc patches

Revert "mm: make is_vmalloc_addr lockless"

This reverts commit 675539b2812b0db12490210ed079185f933a1b3b.

Revert "Kconfig: Add menu choice option to reclaim virtual memory"

This reverts commit a447197635ef394d8e9270bbcc7049f8beb20e75.

Revert "Kconfig: Add config option to support vmalloc savings"

This reverts commit f5130adb4c3abd7cbe977f7304bf6fb3ced84fc7.

Revert "mm: Update is_vmalloc_addr to account for vmalloc savings"

This reverts commit 62da64efd769329b19ca1602d5bb5c4ff564a682.

Revert "msm: Increase the kernel virtual area to include lowmem"

This reverts commit 274df3aaf5836c671823318d20ccfac962b4e411.

Revert "msm: Allow lowmem to be non contiguous and mixed."

This reverts commit 258fe02b4797883aef9823a8d1c336ada71a7516.
Revert "staging: zram: Add auto loading of module if user opens /dev/zram."

This reverts commit c70bda992c12e593e411c02a52e4bd6985407539.

It's incorrect, Kay writes:
	Please just remove it. "devname" is meant to be used for
	single-instance devices with a static dev_t, never for things
	like zramX.

	It will not do anything useful here, it does nothing really
	without a statically assigned dev_t, and it should not be used
	for devices of this kind anyway.

Reported-by: Tom Gundersen <teg@jklm.no>
Reported-by: Kay Sievers <kay@vrfy.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Staging: zram: Fix access of NULL pointer

commit 46a51c80216cb891f271ad021f59009f34677499 upstream.

This patch fixes the bug in reset_store caused by accessing NULL pointer.

The bdev gets its value from bdget_disk() which could fail when memory
pressure is severe and hence can return NULL because allocation of
inode in bdget could fail.

Hence, this patch introduces a check for bdev to prevent reference to a
NULL pointer in the later part of the code. It also removes unnecessary
check of bdev for fsync_bdev().

Acked-by: Jerome Marchand <jmarchan@redhat.com>
Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>