msm8974: rfkill: Fix unbalanced irq

* BlueDroid makes disable call to rfkill which it is already disabled
  causing unbalanced irq which prevents the device from going to sleep.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
drivers: bluetooth: Add DMA QOS Request

* This is from CAF.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
drivers: bluetooth: Increase TX Timer and tune LPM

* TX Timer Interval is increased to 10 for timeout.
* Sleep work is tuned to enter LPM faster, msm_serial_hs
  should take care checking port.

Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ARM: cpu hotplug: remove majority of cache flushing from platforms

Remove the majority of cache flushing calls from the individual platform
files.  This is now handled by the core code.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
net: core: Support UID-based routing.

This contains the following commits:

1. net: core: Add a UID range to fib rules.
2. net: core: Use the socket UID in routing lookups.
3. net: ipv4: Add the UID to the route cache.
4. net: core: Add a RTA_UID attribute to routes.
    This is so that userspace can do per-UID route lookups.

Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Slim-msm: Add NULL pointer checks

Don't access the qmi pointers in qmi_exit function
when the qmi_init is failed, as these pointers are
freed in qmi_init if any error occured.

Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ngd_slim: Register with QMI service in the slave-notification thread

Slave notification thread is used to notify slaves when QMI server
(hosted by slimbus msater driver) on the remote execution environment
has come up. Use that thread's entry point to do QMI service
registration as well since doing so in probe may trigger another
probe by the QMI service leading to boot-up stalling.

Change-Id: I06b1bcfd9aa3d570554971acacd5d7b1dc20fd1c
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
ngd_slim: Fix return paths in transfer function

Return right away if resume fails when runtime-pm is not
enabled. Consolidate return paths if controller power-on
vote fails when runtime-pm is enabled.

CRs-Fixed: 677689
Change-Id: Ia8887dd87df6dba4f93638650794bfcdc7d1ff75
Signed-off-by: Sagar Dharia <sdharia@codeaurora.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
net: wireless: bcmdhd: Add WIPHY_WOWLAN_ANY support

Change-Id: Ia6afe2ebcd0c68622c7f7a1fb36efa62dc009abf
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
Handle 'sk' being NULL in UID-based routing.

Bug: 15413527
Change-Id: If33bebb7b52c0ebfa8dac2452607bce0c2b0faa0
Signed-off-by: Sreeram Ramachandran <sreeram@google.com>
ARM: 7408/1: cacheflush: return error to userspace when flushing syscall fails

The cacheflush syscall can fail for two reasons:

(1) The arguments are invalid (nonsensical address range or no VMA)

(2) The region generates a translation fault on a VIPT or PIPT cache

This patch allows do_cache_op to return an error code to userspace in
the case of the above. The various coherent_user_range implementations
are modified to return 0 in the case of VIVT caches or -EFAULT in the
case of an abort on v6/v7 cores.

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
lib: cpu_rmap: avoid flushing all workqueues

In some cases, free_irq_cpu_rmap() is called while holding a lock (eg
rtnl).  This can lead to deadlocks, because it invokes
flush_scheduled_work() which ends up waiting for whole system workqueue
to flush, but some pending works might try to acquire the lock we are
already holding.

This commit uses reference-counting to replace
irq_run_affinity_notifiers().  It also removes
irq_run_affinity_notifiers() altogether.

[akpm@linux-foundation.org: eliminate free_cpu_rmap, rename cpu_rmap_reclaim() to cpu_rmap_release(), propagate kref_put() retval from cpu_rmap_put()]
Signed-off-by: David Decotigny <decot@googlers.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Or Gerlitz <ogerlitz@mellanox.com>
Acked-by: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>