ARM: dts: msm8974: Allow power collapse as minimum l2 gdhs mode

This fixes warnings "IRQ40 no longer affine to CPUn". The switch
to C2 is also hardly understandable.
msm8974-regulator.dtsi: adjust GFX regulator parameters

settings based on qcom documentation

Change-Id: I57c0e3ad4ac40305d07e2095688fca1244398570
Signed-off-by: Paul Reioux <reioux@gmail.com>
msm8974pro: dts: cpufreq: introduce 268MHz clock

Change-Id: I41c5afea1daeadbf68157864dee73d1d577d6a79
msm8974pro: dts: Add qcom,cpufreq-table

Change-Id: I09a07f25436080f379dc9cbfc02d987e2586336e
msm8974pro: regulator: set retention-voltage to 600mV

Change-Id: Icbb40c8b9df80f08a95154bc584c35b2a5eecc3d
msm: mdss: please be quiet

Change-Id: Id2b80b66c7fc6fca0f3a15d4adaed008823c29a2
msm: mdss: Only pass display state to lcd_notifer_call_chain

 - We can pass 'NULL' directly to blocking_notifier_call_chain
 - Remove unused struct 'lcd_event'

Change-Id: I01c4b26b76bc31e37f458513f6043f28ebf683ed
msm: mdss: fixup wait_event_interruptible

Change-Id: Ice7d83972a5f8f00ac2bf216a65d9824f29c0d22
nohz: Fix another inconsistency between CONFIG_NO_HZ=n and nohz=off

Change-Id: I6321b265d07518169bc7c10926035e3063089496
Revert "tick-sched: recalculate sleep length each time it is requested"

This reverts commit 1c0a4128e47a7673e6e1347ce6dc40427ccc4a16.

Change-Id: I1641b7a9b7f486386a3a2c33683306448ceb8a94
futex: Ensure get_futex_key_refs() always implies a barrier

Commit (futexes: Avoid taking the hb->lock if there's
nothing to wake up) changes the futex code to avoid taking a lock when
there are no waiters. This code has been subsequently fixed in commit
11d4616bd07f (futex: revert back to the explicit waiter counting code).
Both the original commit and the fix-up rely on get_futex_key_refs() to
always imply a barrier.

However, for private futexes, none of the cases in the switch statement
of get_futex_key_refs() would be hit and the function completes without
a memory barrier as required before checking the "waiters" in
futex_wake() -> hb_waiters_pending(). The consequence is a race with a
thread waiting on a futex on another CPU, allowing the waker thread to
read "waiters == 0" while the waiter thread to have read "futex_val ==
locked" (in kernel).

Without this fix, the problem (user space deadlocks) can be seen with
Android bionic's mutex implementation on an arm64 multi-cluster system.

Change-Id: I964d83adb57fd87224cd3923c9790b18f7752407
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reported-by: Matteo Franchin <Matteo.Franchin@arm.com>
Fixes: b0c29f79ecea (futexes: Avoid taking the hb->lock if there's nothing to wake up)
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Tested-by: Mike Galbraith <umgwanakikbuti@gmail.com>
Cc: <stable@vger.kernel.org>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
intelli_plug: add performance boost option

also fixed dependency on __cpuinit

bumped to version 3.9

Change-Id: I701fba7075303de69b168f0f8ccef9a46c31657a
Signed-off-by: Paul Reioux <reioux@gmail.com>
soc: qcom: rq_stats: Pass correct cpu id to update_average_load function

Pass correct cpu number to update_average_load function
from cpufreq_transition_handler function. Also avoid div by zero
condition in update_average_load function.

CRs-Fixed: 708310
Change-Id: I4ec3e54b92c760ac5fa910542524fdfe919f55e9
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
msm: wlan: Fix dangling pAdapter pointer in HDD.

On getting response from FW , SME calls hdd in
hdd_tx_per_hit_cb with pAdapter as argument.But
by that pAdapter in hdd might be removed.
As a part of fix, instead of passing pAdapter,
sessionId is passed. So when SME gets response from
FW , it will call hdd with sessionId and in hdd based
on sessionId a valid pAdapter would be used.

Change-Id: I50b484f2b2fbff17766ea14315132a9d6531e86b
CRs-Fixed: 699843
Signed-off-by: Kaushik, Sushant <skaushik@codeaurora.org>
ASoC: msm-lsm-client: open q6 lsm session before client prepare

In order to meet requirments for all use cases from HAL,
it is required to open q6 lsm session before prepare/start
so that other ioctl's relating to LSM settings can be
performed before prepare/start.
Open q6 lsm session from ioctl to set session data.

Change-Id: Ibbae086562854b07b1063839ef68aa4f97187569
Signed-off-by: Dhananjay Kumar <dhakumar@codeaurora.org>
camera_oppo_v2: Import release 4993

Change-Id: I4ca4b8ae1763822f232c314c8aa20836ad4aae80
timekeeping: iopoll: fix timeout calculations into ktime_get routine

Fix credits to dorimanx

Change-Id: I6ebb0d3eb961b2a3ad44201df8908017a2389530
Signed-off-by: engstk <eng.stk@sapo.pt>
PCI / PM: Resume runtime-suspended devices later during system suspend

Runtime-suspended devices are resumed during system suspend by
pci_pm_prepare() for two reasons: First, because they may need
to be reprogrammed in order to change their wakeup settings and,
second, because they may need to be operatonal for their children
to be successfully suspended.  That is a problem, though, if there
are many runtime-suspended devices that need to be resumed this
way during system suspend, because the .prepare() PM callbacks of
devices are executed sequentially and the times taken by them
accumulate, which may increase the total system suspend time quite
a bit.

For this reason, move the resume of runtime-suspended devices up
to the next phase of device suspend (during system suspend), except
for the ones that have power.ignore_children set.  The exception is
made, because the devices with power.ignore_children set may still
be necessary for their children to be successfully suspended (during
system suspend) and they won't be resumed automatically as a result
of the runtime resume of their children.

Change-Id: I5eb4e20269b18e2e4af1f935f5d15ffcd74cd23e
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
ASoC: msm: qdsp6v2: add check for NULL dereference

The asm loopback driver during close does not check
for NULL before closing the playback and capture
instances.

The change ensures only the valid playback/capture
instances are closed.

CRs-Fixed: 643724

Change-Id: I698d8fb75ce838635ed6dd70eedb6b509b9fcec6
Signed-off-by: Aravind Kumar <akumark@codeaurora.org>
Signed-off-by: Pradosh Das <c_prados@qti.qualcomm.com>
mm: vmscan: lock page on swap error in pageout

A workaround was added ealier to move a page to active
list if swapping to devices like zram fails. But this
can result in try_to_free_swap being called from
shrink_page_list, without a properly locked page.
Lock the page when we indicate to activate a page
in pageout().
Add a check to ensure that error is on swap, and
clear the error flag before moving the page to
active list.

CRs-fixed: 760049
Change-Id: I77a8bbd6ed13efdec943298fe9448412feeac176
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>