net: wireless: bcmdhd: Add ROAM setting per platform from Makefle

Change-Id: Ia6bc3025e3641cb6b91022ab1c9976c0f6ad16a4
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
net: wireless: bcmdhd: Update wifi stack ps state if was changed

Change-Id: Ib1ee0b6ee05077d1ed6cfb578b6384dfc9787c81
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>

Conflicts:

	drivers/net/wireless/bcmdhd/wl_cfg80211.h
net: wireless: bcmdhd: Add print when power-save mode is OFF

Change-Id: Idc72198b2d59c76dd45ba918cef982bcd7b570ab
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
kthread_worker: reorganize to prepare for flush_kthread_work() reimplementation

Make the following two non-functional changes.

* Separate out insert_kthread_work() from queue_kthread_work().

* Relocate struct kthread_flush_work and kthread_flush_work_fn()
  definitions above flush_kthread_work().

v2: Added lockdep_assert_held() in insert_kthread_work() as suggested
    by Andy Walls.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Andy Walls <awalls@md.metrocast.net>
kthread_worker: reimplement flush_kthread_work() to allow freeing the work item being executed

kthread_worker provides minimalistic workqueue-like interface for
users which need a dedicated worker thread (e.g. for realtime
priority).  It has basic queue, flush_work, flush_worker operations
which mostly match the workqueue counterparts; however, due to the way
flush_work() is implemented, it has a noticeable difference of not
allowing work items to be freed while being executed.

While the current users of kthread_worker are okay with the current
behavior, the restriction does impede some valid use cases.  Also,
removing this difference isn't difficult and actually makes the code
easier to understand.

This patch reimplements flush_kthread_work() such that it uses a
flush_work item instead of queue/done sequence numbers.

Signed-off-by: Tejun Heo <tj@kernel.org>
wakeup: Use irqsave/irqrestore for events_lock

Jon Medhurst (Tixy) recently noticed a problem with the
events_lock usage. One of the Android patches that uses
wakeup_sources calls wakeup_source_add() with irqs disabled.
However, the event_lock usage in wakeup_source_add() uses
spin_lock_irq()/spin_unlock_irq(), which reenables interrupts.
This results in lockdep warnings.

The fix is to use spin_lock_irqsave()/spin_lock_irqrestore()
instead for the events_lock.

Full bug report here:
https://bugs.launchpad.net/linaro-landing-team-arm/+bug/1037565

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Android Team <kernel-team@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Jon Medhurst (Tixy) <tixy@linaro.org>
Reported-and-debugged-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Id455188931229f04e353969af389e49b069cb34c

Conflicts:
	drivers/base/power/wakeup.c
added lowmemory file from linux master branch
lowmemorykiller: Compact memory when killing processes

 * Memory compaction is never invoked on Android because we avoid swap
   and don't allocate huge pages. Fix it by invoking compaction from the LMK when
   a process is killed to reduce memory fragmentation.

Change-Id: I2bda790c2093e65fd6f43d52ea5149d6b57cb1e9
lowmemorykiller: Use asynchronous compaction

Change-Id: I6a65d06fc30b88fcedaaf1abf1855fdd19e3c912

Conflicts:
	mm/compaction.c
changed voltage
minor fix
Revert "wakeup: Use irqsave/irqrestore for events_lock"

This reverts commit 2a92dfbaaa77cd3974a2bb89e0f33bb9a6e8e609.
wakeup: Use irqsave/irqrestore for events_lock

Jon Medhurst (Tixy) recently noticed a problem with the
events_lock usage. One of the Android patches that uses
wakeup_sources calls wakeup_source_add() with irqs disabled.
However, the event_lock usage in wakeup_source_add() uses
spin_lock_irq()/spin_unlock_irq(), which reenables interrupts.
This results in lockdep warnings.

The fix is to use spin_lock_irqsave()/spin_lock_irqrestore()
instead for the events_lock.

Full bug report here:
https://bugs.launchpad.net/linaro-landing-team-arm/+bug/1037565

Cc: Rafael J. Wysocki <rjw@sisk.pl>
Cc: Android Team <kernel-team@android.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Jon Medhurst (Tixy) <tixy@linaro.org>
Reported-and-debugged-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: Id455188931229f04e353969af389e49b069cb34c

Conflicts:
	drivers/base/power/wakeup.c